Tangent Calculator Formula

Understand the math behind the tangent calculator. Each variable explained with a worked example.

Formulas Used

Tangent Val

tangent_val = tan(angle_deg * pi / 180)

Sine Val

sine_val = sin(angle_deg * pi / 180)

Cosine Val

cosine_val = cos(angle_deg * pi / 180)

Variables

VariableDescriptionDefault
angle_degAngle (degrees)(deg)45

How It Works

Tangent Function

Definition

tan(angle) = opposite / adjacent = sin(angle) / cos(angle)

Key Values

| Angle | tan | |-------|-----| | 0° | 0 | | 30° | 1/√3 ≈ 0.5774 | | 45° | 1 | | 60° | √3 ≈ 1.7321 | | 90° | undefined |

Worked Example

Calculate tan(45°).

angle_deg = 45
  1. 01tan(45°) = 1
  2. 02sin(45°) = √2/2 ≈ 0.7071
  3. 03cos(45°) = √2/2 ≈ 0.7071
  4. 04tan = sin/cos = 0.7071/0.7071 = 1

Ready to run the numbers?

Open Tangent Calculator