Tangent Calculator
Calculate the tangent of an angle in degrees, radians or gradians. Shows "Undefined" when the tangent does not exist.
What is Tangent?
The tangent of an angle θ is the ratio of the opposite side to the adjacent one: tan(θ) = sin(θ) / cos(θ). Unlike sine and cosine, it has no bound and can take any real value.
Among the notable values are tan(0°) = 0, tan(30°) ≈ 0.5774, tan(45°) = 1 and tan(60°) ≈ 1.7321. At 90°, 270° and the other odd multiples of 90°, tangent becomes undefined.
Unit conversions: 1° equals π/180 rad ≈ 0.01745 rad, while 1 rad equals 180°/π ≈ 57.296°. And 400 gradians correspond to 360°.
The tangent function
The tangent is defined as tan(θ) = sin(θ)/cos(θ), which in a right triangle equals the ratio opposite side / adjacent side. It has period π (half that of sine and cosine) and vertical asymptotes wherever the cosine vanishes, i.e. at θ = π/2 + kπ. It is an odd function: tan(−θ) = −tan(θ). Reference values: tan(0) = 0, tan(30°) = √3/3, tan(45°) = 1, tan(60°) = √3, and tan(90°) undefined. Its derivative is (tan x)' = sec²x.
Applications: slopes, roofs and accessibility
The tangent is the natural way to express slope: a ramp with angle α has tan(α) = rise / run. The Brazilian accessibility standard NBR 9050 caps ramps at 8.33% (about 4.76°). Roofers use it to convert pitch to angle, surveyors measure building heights by reading the angle of elevation to the top and applying height = distance · tan(α), optics uses it in Snell's law and Brewster's angle, and GPS triangulation relies on tangent ratios between known points.
Calculate the tangent of an angle
The tangent is the ratio between sine and cosine, and it has a curious quirk: it "blows up" at certain angles, right where the cosine is zero. This calculator finds the tangent of any angle and, at those points, displays "Undefined" to warn you.
You enter the angle in degrees, radians or gradians, and the tool handles the calculation and the special cases. That treatment of the undefined matters. At 90°, for example, the tangent doesn't exist, and a calculator that returns a giant number instead of warning ends up leading you astray.
The calculation is done in the browser. It works for trigonometry, calculating slopes and ramps, physics and engineering.
Frequently asked questions
Why is tan(90°) undefined?
Why is the period π and not 2π?
How do I get a roof angle from pitch?
How do I measure a building from its shadow?
Related Tools
Cotangent Calculator
Calculate the cotangent of an angle in degrees, radians or gradians. Shows "Undefined" when the cotangent does not exist.
Sine Calculator
Calculate the sine of an angle in degrees, radians or gradians. Precise result with up to 10 significant digits.
Secant Calculator
Calculate the secant of an angle in degrees, radians or gradians. The secant is the reciprocal of the cosine.
Arctangent Calculator
Calculate the arctangent (arctan) of a value and get the angle in degrees, radians and gradians. Accepts any real number.
Cosecant Calculator
Calculate the cosecant of an angle in degrees, radians or gradians. The cosecant is the reciprocal of the sine.
Cosine Calculator
Calculate the cosine of an angle in degrees, radians or gradians. Precise result with up to 10 significant digits.
The results provided by this tool are for general informational and educational purposes only and do not constitute professional, financial, medical, legal, tax or accounting advice. Always confirm important decisions with a qualified professional and official sources.