Tangent Calculator

Calculate tangent values for any angle in degrees or radians. Visualize tangent function and understand trigonometric properties with interactive graphs.

°
30° 45° 60° 90° 120° 180° π/2 rad π rad
Privacy first: All calculations are client-side. No data is sent to any server.

Understanding Tangent: Definition & Geometry

The tangent function (tan θ) is one of the fundamental trigonometric ratios. In a right triangle, tan θ = opposite / adjacent. On the unit circle (radius = 1), tan θ corresponds to the length of the line segment tangent to the circle at the point (1,0) — from that point to the intersection with the terminal ray extended. This geometric interpretation explains why tan θ is periodic with period π (180°) and why it becomes undefined at θ = π/2 + kπ (vertical asymptotes).

tan θ = sin θ / cos θ     cot θ = 1 / tan θ     sec θ = 1 / cos θ

For any real angle where cos θ ≠ 0.

The tangent function appears extensively in physics (projectile motion, inclined planes), engineering (slope, grade, phase angles), and navigation (bearing calculations). The derivative of tan x is sec² x, making it essential in calculus and differential equations.

Historical & Theoretical Background

The tangent function was developed alongside sine and cosine by Islamic mathematicians in the 9th century, notably by Al-Battani. Later, European mathematicians like Regiomontanus and Euler formalized the modern analytic definition. The word “tangent” comes from Latin tangere (to touch), reflecting its geometric origin as a line touching the circle.

Real‑world Application: Slope & Grade

In civil engineering, the grade (steepness) of a road is expressed as a percentage: grade = tan(θ) × 100%, where θ is the angle of inclination. A 10% grade corresponds to tan θ = 0.10 → θ ≈ 5.71°. Our calculator instantly provides tan θ, allowing engineers to convert between slope ratios and degrees.

How to Use This Tangent Calculator

  1. Enter any angle (degrees or radians) in the input field.
  2. Select the unit mode: Degrees (°) or Radians (rad).
  3. Click “Calculate & Visualize” or use the example badges to test standard angles.
  4. View exact trigonometric values and the dynamic unit circle showing the terminal ray, sine/cosine projections, and the tangent segment.
  5. Observe how tan θ changes sign depending on quadrant (positive in QI & QIII, negative in QII & QIV).

Key Properties & Trigonometric Identities

  • Periodicity: tan(θ + π) = tan(θ)
  • Even/Odd: tan(-θ) = -tan(θ) (odd function)
  • Pythagorean identity: 1 + tan²θ = sec²θ
  • Angle sum: tan(α+β) = (tan α + tan β) / (1 - tan α tan β)
  • Asymptotes: tan θ → ±∞ as θ → π/2 + kπ

Derivation of Tangent on the Unit Circle

Consider the unit circle centered at origin. The terminal ray of angle θ intersects the circle at point P = (cos θ, sin θ). The vertical line x = 1 is tangent to the circle at T = (1,0). Extending the terminal ray meets this line at point Q = (1, tan θ). The signed distance from T to Q equals tan θ — positive if Q is above x-axis, negative if below. This visual makes clear why tan θ = sinθ/cosθ and why tan is undefined when cosθ = 0.

Angle θ (degrees) tan θ Quadrant Sign of tan
0 Boundary Zero
30° 0.5774 QI Positive
45° 1 QI Positive
60° 1.7321 QI Positive
120° -1.7321 QII Negative
180° 0 Boundary Zero
240° 1.7321 QIII Positive

Mathematical rigor & verification – This tool implements JavaScript's IEEE 754 double-precision floating point arithmetic. Edge cases (asymptotes) are handled by checking for cosθ near zero. The unit circle visualization uses canonical geometric mapping. Reviewed by the GetZenQuery Tech team, April 2026. References: Wolfram MathWorld: Tangent, OpenStax Precalculus, and "Trigonometry" by I.M. Gelfand.

Frequently Asked Questions

At 90° (π/2 rad), cosθ = 0, so tanθ = sinθ/cosθ leads to division by zero. Geometrically, the terminal ray is vertical and never meets the vertical line x = 1, so the tangent segment length is infinite.

Multiply degrees by π/180. For example, 60° = 60 × π/180 = π/3 ≈ 1.0472 rad. This calculator does it automatically.

Tanθ can be any real number (−∞, ∞). It covers all real values exactly once in each open interval (−π/2, π/2).

Yes, negative angles rotate clockwise. The calculator returns tan(-θ) = -tan(θ) and the visualization reflects this.
Trusted educational reference: For deeper reading, consult "Trigonometry For Dummies" by Mary Jane Sterling or the interactive demonstrations at PhET Colorado.

Mathematical Validation & External References

This calculator uses double-precision floating point arithmetic compliant with IEEE 754. For verification, you may compare results with:

Precision note: For angles extremely close to asymptotes (e.g., 90° ± 1e-10), tan values may exceed 1e15; the calculator will show them as finite numbers. This reflects mathematical reality.

Exact values for common angles: tan(30°)=√3/3 ≈ 0.577350, tan(45°)=1, tan(60°)=√3 ≈ 1.732051. The calculator approximates these to 6 decimal places.

Accuracy guarantee: All trigonometric computations are performed using native JavaScript Math functions, which are tested for correctness across all real numbers. The visual representation aligns with analytic geometry principles.