Tangent Calculator: tan θ = sin θ / cos θ with Exact Values
By FindMySum · Last reviewed
A tangent calculator finds tan θ, the sine of an angle divided by its cosine. Enter the angle in degrees, radians, multiples of π or gradians: you get the exact value for special angles (tan 45° = 1, tan 30° = √3/3, tan 60° = √3), a 12-significant-figure decimal otherwise, the angle on the unit circle, the cotangent (1/tan θ), and a table of tangent from 0° to 360° that marks where it is undefined.
Tangent is a slope
In a right triangle: tan θ = opposite side ÷ adjacent side, the rise over the run. That makes tangent the natural function for heights and slopes. Stand 20 m from a tree, look up 35° to its top, and the top is 20 × tan 35° ≈ 14.0 m above your eyes.
On the unit circle: with the point (cos θ, sin θ) at angle θ, tan θ = sin θ / cos θ, which is the slope of the ray from the origin. It is also the length cut off on the vertical line x = 1, the "tangent line" to the circle that gives the function its name.
The default example: tan 45°
The calculator opens at 45°, where sine and cosine are both √2/2. Their ratio is tan 45° = 1: a 45° line rises exactly as much as it runs. The cotangent is also 1, and the cofunction line confirms cot 45° = tan 45°.
Exact tangent values
| θ | 0° | 30° | 45° | 60° | 90° | 120° | 135° | 150° | 180° |
|---|---|---|---|---|---|---|---|---|---|
| tan θ | 0 | √3/3 | 1 | √3 | undefined | −√3 | −1 | −√3/3 | 0 |
From 180° to 360° the same pattern repeats: tan 225° = 1, tan 240° = √3, tan 300° = −√3. The table on the page gives every value through 360° with its decimal.
Why tan 90° is undefined
At 90° the point on the circle is (0, 1) and tan θ = 1 ÷ 0, which has no value: a vertical line has no slope. As the angle creeps toward 90°, tangent grows without bound (tan 89° ≈ 57.29, tan 89.9° ≈ 573) and just past 90° it is hugely negative. The graph has vertical asymptotes at 90°, 270° and every 180° from them. The calculator reports these angles as undefined; a radian value typed as 1.5708 is only near π/2 and gives a large finite number, so use "multiples of π" and 0.5 for the exact angle.
Period and signs
Tangent repeats every 180° (π radians), half the period of sine and cosine, because pointing the ray the opposite way leaves its slope unchanged. Its values cover every real number. It is positive in quadrants I and III, where sine and cosine share a sign, and negative in II and IV.
Degrees, radians and grade
Check the angle unit before trusting a tangent. tan 1 in radian mode is 1.55740772465 (1 radian ≈ 57.3°), but tan 1° is only 0.0174550649. For small angles in radians, tan x ≈ x, which is why tan 0.01 ≈ 0.0100003.
Road and roof slopes are often given as a percentage or a ratio rather than an angle. Both are tangents: a 6% grade has tan θ = 0.06 (θ ≈ 3.43°), and a 4-in-12 roof pitch has tan θ = 4/12 (θ ≈ 18.43°).
Tangent identities
Because tan θ = sin θ / cos θ, dividing sin² θ + cos² θ = 1 by cos² θ gives 1 + tan² θ = sec² θ. The addition formula tan(a + b) = (tan a + tan b) / (1 − tan a tan b) shows, for example, that tan 75° = (1 + √3/3) / (1 − √3/3) = 2 + √3 ≈ 3.732. To solve tan θ = k, take θ = arctan k and add multiples of 180°: tan θ = 1 gives 45° and 225° in one turn. Unlike sine and cosine, every real k has a solution.
Uses of tangent
- Heights and distances: height = distance × tan(angle of elevation), the method behind clinometers and rangefinders.
- Slopes and ramps: converting between angle, grade percentage and rise-over-run.
- Calculus: d/dx tan x = sec² x, and arctan appears in integrals of 1/(1 + x²).
- Optics and photography: the field of view of a lens is 2 arctan(sensor width ÷ (2 × focal length)).
Related calculators
The cotangent calculator gives 1/tan θ, and the sine and cosine calculators give the two functions tangent is built from. For the angle whose tangent is a given value (arctan), use the trigonometry calculator.
More questions
What is tan 60°?
√3, about 1.73205080757. At 60° sine is √3/2 and cosine 1/2, and (√3/2) ÷ (1/2) = √3.
What is tan 30°?
√3/3, about 0.57735026919, which is 1/√3 with the root moved to the top. It is the reciprocal of tan 60°.
How do I turn a slope percentage into an angle?
A grade of p% means tan θ = p/100, so θ = arctan(p/100). A 10% road grade is arctan(0.1) ≈ 5.71°, and a 100% grade is 45°, not vertical.
Is tangent odd or even?
Odd: tan(−θ) = −tan θ. A ray turned 30° below the x-axis has the opposite slope to one turned 30° above it.
What is the derivative of tan x?
sec² x, which equals 1 + tan² x (x in radians). The integral of tan x is −ln|cos x| + C.
Sources
This article explains how the calculator works and is general information, not financial, tax, legal or medical advice. Rules change; check the sources above or a qualified professional before you act.