Tangent Calculator

Slope, Expressed as an Angle

Tangent is the ratio of the opposite side to the adjacent side in a right triangle, and equivalently the ratio of sine to cosine at any angle. It has a direct geometric meaning too: tan(θ) is literally the slope of a line making angle θ with the horizontal, which is why it shows up constantly in grade calculations, roof pitches, and line-of-sight problems.

The Formula

tan(θ) = sin(θ) / cos(θ)

Because tangent is a ratio involving cosine in the denominator, it's undefined wherever cosine equals zero — at 90° and 270°, and every 180° from those points. The calculator detects this near-zero denominator and returns an explicit error rather than an unreliable extreme value.

Where Tangent Is Used

  • Slope and grade — road grades, roof pitches, and ramp angles are all tangent relationships.
  • Surveying — finding the height of an object from a measured angle and known horizontal distance.
  • Physics — projectile launch angles and friction coefficients both involve tangent.
  • Computer graphics — camera field-of-view calculations use tangent to relate angle to screen distance.
Tangent at common angles
Angletan(θ)
0
30°0.57735
45°1
60°1.732051
90°undefined

How to Use This Calculator

  1. Enter the Angle.
  2. Select the unit: Degrees or Radians.
  3. Select Calculate to see the tangent value.

Related Calculations

Need the reciprocal ratio? The Cotangent Calculator computes 1/tan(θ). To solve for the angle given a tangent value, use the Trigonometric Equation Solver.