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

Angletan 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

Frequently Asked Questions

What is the tangent function?

Tangent is the ratio of sine to cosine, or equivalently, the ratio of the opposite side to the adjacent side in a right triangle.

Why is tan(90°) undefined?

At 90°, cosine equals zero, and division by zero is undefined. The tangent function approaches infinity as the angle approaches 90°.

What is the period of tangent?

Tangent has a period of 180° (pi radians), which is half the period of sine and cosine.

Learn More

Guide

Trigonometry Basics - Complete Guide

Learn the fundamentals of trigonometry including sine, cosine, tangent, the unit circle, identities, and the laws of sines and cosines with practical examples.

Ready to run the numbers?

Open Tangent Calculator