Tangent Calculator

Enter an angle to get its tangent (tan θ = sin θ / cos θ), along with the matching sine, cosine, and cotangent.

Quick Facts

Tangent formula
tan(θ) = sin(θ) / cos(θ)
Equal to opposite / adjacent in a right triangle.
Undefined points
θ = 90° + 180°n
Wherever cos(θ) = 0, tangent is undefined.
Period
180° (π radians)
Half the period of sine and cosine.

Your Results

Calculated
Tangent
-
tan(θ) = sin(θ) / cos(θ)
Sine
-
sin(θ)
Cosine
-
cos(θ)
Cotangent
-
cot(θ) = 1 / tan(θ)

Ready

Enter an angle and its unit, then press Calculate.

Formula and Method for the Tangent Calculator

The tangent of an angle θ, written tan(θ), is defined as the ratio of the sine to the cosine of that angle: tan(θ) = sin(θ) / cos(θ). In a right triangle, this is equivalent to the ratio of the length of the side opposite the angle to the length of the side adjacent to it: tan(θ) = opposite / adjacent. This calculator takes an angle in degrees, radians, or gradians and returns its tangent along with the related sine, cosine, and cotangent values.

How the calculation works

Enter an angle and select its unit. If you choose degrees or gradians, the calculator first converts the angle to radians — radians = degrees × π/180, or radians = gradians × π/200 — because the underlying math functions expect radians. It then computes tan(θ) = sin(θ) / cos(θ) directly, along with sin(θ), cos(θ), and the cotangent cot(θ) = 1 / tan(θ) = cos(θ) / sin(θ). If cos(θ) is extremely close to zero, the tangent is undefined (it approaches +∞ or -∞), and the calculator flags this instead of returning a misleading number.

Domain, range, and periodicity

Unlike sine and cosine, which are defined for every angle and stay between -1 and 1, tangent is undefined wherever cos(θ) = 0 — at θ = 90°, 270°, and every 180° from there — because that requires dividing by zero. Where it is defined, tangent's range is all real numbers, from -∞ to +∞. Tangent also repeats every 180° (π radians), half the period of sine and cosine, so tan(θ + 180°) = tan(θ) for any θ.

Common applications

  • Slope and grade: the slope of a line equals the tangent of its angle of inclination from horizontal — used for road grades, roof pitches, and ramps.
  • Right-triangle problems: with one acute angle and one side known, tan(θ) = opposite / adjacent finds the missing side (surveying, construction, navigation).
  • Physics and engineering: tangent appears in projectile launch angles, optics, and AC circuit phase-angle calculations.
  • Surveying and mapping: elevation-angle and bearing calculations often use tangent to relate horizontal distance to height difference.

Frequently Asked Questions

What is the formula for tangent?
Tangent is the ratio of sine to cosine: tan(θ) = sin(θ) / cos(θ). In a right triangle it equals the length of the side opposite an acute angle divided by the length of the side adjacent to it: tan(θ) = opposite / adjacent.
Why is tangent undefined at 90° and 270°?
Because tan(θ) = sin(θ) / cos(θ) and cos(θ) = 0 at 90°, 270°, and every 180° from there, the formula requires dividing by zero at those angles, so tangent is undefined (it approaches +∞ or -∞ on either side).
What is the difference between degrees, radians, and gradians?
They are three units for measuring the same angle: a full circle is 360 degrees, 2π (about 6.2832) radians, or 400 gradians. Convert with radians = degrees × π/180 or radians = gradians × π/200.
What is the period of the tangent function?
Tangent repeats every 180° (π radians): tan(θ + 180°) = tan(θ). This is half the 360° period of sine and cosine, because tangent's sign pattern repeats twice as fast.