Tangent calculator
Favorites
No favorites yet. Press Favorite on any page to keep it here.
Enter an angle for tan θ, exact for standard angles and flagged as undefined where cosine is zero. The inverse tangent (arctan) modes turn a tangent value, the two legs of a right triangle, or a slope written as a gradient or percentage grade back into an angle.
Type 30, 30°, pi/6, π/3, 1.2 rad or 36°52′. Anything with π is read as radians.
Any real number. Roots work: √3, -1/√3.
Examples: 0.5, 3/4, -2, 8%.
The point at θ on the unit circle is (cos θ, sin θ) = (0.5, 0.866025). The yellow segment on the line x = 1 has length tan θ.
Show the working, step by step
60° is in quadrant I, where all six functions are positive, so it is its own reference angle.
reference angle = 60°
Evaluate tan directly (a standard angle, so the exact value is known).
tan 60° = √3 ≈ 1.73205
What tangent means
tan θ = opposite ÷ adjacent = sin θ ÷ cos θ
In a right triangle, tangent is the side opposite the angle divided by the side next to it. Rise over run. That makes it the natural function for slopes. A line making angle θ with the horizontal has gradient m = tan θ. On the unit circle, tan θ is the length of the segment cut off on the vertical line x = 1, the yellow segment in the drawing, which is where the name (Latin tangens, touching) comes from.
Tangent: a worked example
The calculator opens with θ = 60°.
- 60° is in quadrant I, where tangent is positive.
- sin 60° = √3/2 and cos 60° = 1/2, so tan 60° = (√3/2) ÷ (1/2) = √3 ≈ 1.73205.
- As a slope, a 60° line rises 1.73205 for every 1 across, a 173.2% grade.
Where tangent is undefined
Tangent divides by cos θ, which is zero at 90°, 270° and every 90° + k·180° (π/2 + kπ in radians). At those angles the calculator reports “undefined” rather than a huge number. Between them the tangent takes every real value once, which is why its period is 180° and why arctan accepts any input.
Tangent values to know
| θ | Radians | tan θ exact | Decimal |
|---|---|---|---|
| 0° | 0 | 0 | 0 |
| 15° | π/12 | 2 − √3 | 0.267949 |
| 30° | π/6 | √3/3 | 0.57735 |
| 45° | π/4 | 1 | 1 |
| 60° | π/3 | √3 | 1.73205 |
| 75° | 5π/12 | 2 + √3 | 3.73205 |
| 90° | π/2 | undefined | – |
Slopes, grades and pitches
Every slope measure is a tangent in disguise. Choose “Slope or grade → angle” and type a gradient (0.5, 3/4) or a grade with a percent sign. The default, an 8% road, is arctan 0.08 = 4.57392°. Some reference points:
| Slope | Gradient | Angle |
|---|---|---|
| 1:12 wheelchair ramp | 0.0833 | 4.76° |
| 25% grade | 0.25 | 14.04° |
| 6 in 12 roof pitch | 0.5 | 26.57° |
| 100% grade | 1 | 45° |
| 1000% grade | 10 | 84.29° |
Tangent also measures heights you cannot reach. Standing 50 m from a building and sighting its top at 32° above the horizontal, the height above eye level is 50 × tan 32° = 31.2 m.
Common mistakes
- Reading a grade as an angle. A 10% slope is 5.71°, not 10°. A 100% slope is 45°.
- Missing the second solution. tan θ = k also holds 180° after the principal value.
- Radian mode. tan 1 is 1.55741 in radians and 0.0174551 in degrees.
Common questions
Why is tan 90° undefined?
tan θ = sin θ ÷ cos θ, and cos 90° = 0, so the division has no answer. Close to 90° the tangent grows without limit. tan 89° = 57.29 and tan 89.9° = 572.96. The same happens at 270° and at every 90° + k·180°, which is where the graph of tan x has its vertical asymptotes.
How do I convert a slope or grade to an angle?
Take the inverse tangent of the gradient. A slope of 0.5 (rise 1 over run 2) is arctan 0.5 = 26.57°. For a percentage grade, divide by 100 first. An 8% road is arctan 0.08 = 4.57°. A 100% grade is 45°, not 90°.
What is the difference between tan⁻¹ and cot?
tan⁻¹ x means the inverse tangent, arctan x. The angle whose tangent is x. cot x is the reciprocal, 1 ÷ tan x. They are not the same. tan⁻¹(1) = 45°, while cot(1 rad) = 0.642.
How many solutions does tan θ = k have?
Two in every full turn, 180° apart, for any real k. tan θ = 1 gives θ = 45° and 225°, and the general solution is θ = 45° + 180°n. Tangent repeats every 180° (π radians), not every 360°.
What is a 4 in 12 roof pitch in degrees?
A rise of 4 over a run of 12 is a gradient of 4/12 = 0.3333, so the angle is arctan(0.3333) = 18.43°. A 6 in 12 pitch is 26.57°, and a 12 in 12 pitch is 45°.
Related calculators
-
Sine calculator
sin θ, arcsin and opposite over hypotenuse.
-
Cosine calculator
cos θ, arccos and the law of cosines.
-
Trig graph calculator
Graph tan x with its asymptotes, period and phase shift.
-
Triangle solver
Solve a right triangle from any two sides or a side and an angle.
-
Slope calculator
Rise over run, percent grade and the angle of a slope.
-
All six trig functions
Including cot θ, the reciprocal of the tangent.