📈 Tan Calculator — Tangent of an Angle (Degrees or Radians)

Enter an angle in degrees or radians and get its tangent instantly, along with the reciprocal cotangent (cot) — undefined cases at 90°, 270°, 0°, and 180° clearly labeled.

📈 Enter Your Angle
Result
tan θ
cot θ (reciprocal)
📈

Enter an angle to see its tangent and cotangent

Guide

About the Tan Calculator

Last updated: July 2026 · Reviewed by the NeftCal editorial team

This tan calculator finds the tangent of any angle you enter, in degrees or radians, and shows the reciprocal ratio, cotangent (cot), right alongside it. Unlike sine and cosine, tangent is genuinely undefined at certain angles — 90°, 270°, and every angle coterminal with them — because tan θ = sin θ / cos θ and cosine equals zero there. This calculator checks for that condition explicitly and displays "Undefined" instead of "Infinity" or a distractingly huge number, so you always get an honest, accurate result.

What This Calculator Measures

Tangent is the ratio of the opposite side to the adjacent side in a right triangle, or equivalently sin θ divided by cos θ on the unit circle — geometrically, it's the slope of the line from the origin to the point at angle θ. This calculator converts your angle to radians internally, evaluates sin and cos, divides them (after checking cos isn't near zero), then computes cot(θ) = cos(θ)/sin(θ) with its own zero-denominator check.

Who Should Use This Calculator

This tool is built for trigonometry and precalculus students checking tangent homework, surveyors and civil engineers calculating height from an angle of elevation, road and civil engineers computing slope or grade percentages, architects working out roof pitch, and anyone who needs a quick, reliable tangent value without digging out a scientific calculator.

Why Tangent Matters

Tangent is the trigonometric ratio most directly tied to slope — "rise over run" for a line at a given angle is exactly tan θ. This makes it the go-to function whenever a real-world problem involves an incline, elevation angle, or grade, and it behaves very differently from sine and cosine: instead of staying bounded between -1 and 1, tangent grows without limit as the angle approaches its undefined points.

Real-World Applications

Civil engineers and road designers express a road's steepness as a percentage grade derived from tan θ. Surveyors use tangent with a known baseline distance and a measured angle of elevation to find a building or tree's height. Architects calculate roof pitch as a tangent ratio. Physicists use tangent to find the angle of a resultant vector from its components. Photographers and cinematographers use tangent-based field-of-view calculations.

Tips for Accurate Results

  • Double-check the degrees/radians toggle — a value meant as radians treated as degrees (or vice versa) produces a completely different tangent.
  • Remember tangent is undefined at 90°, 270°, and their coterminal angles, while cotangent is undefined at 0°, 180°, 360°, and their coterminal angles — these are the opposite pair of asymptotes.
  • Tangent is positive in Quadrants I and III and negative in Quadrants II and IV — use this to sanity-check your sign.
Formula

The Tangent Formula, Explained

How tangent is defined, and its reciprocal relationship with cotangent

Tangent (from a right triangle)
tan θ = opposite ÷ adjacent

Tangent (from sine and cosine)
tan θ = sin θ ÷ cos θ  (undefined when cos θ = 0, i.e. at 90°, 270°, ...)

Reciprocal: Cotangent
cot θ = cos θ ÷ sin θ = 1 ÷ tan θ  (undefined when sin θ = 0, i.e. at 0°, 180°, 360°, ...)

Where:
θ (theta) = the input angle, converted to radians before evaluation.
"Opposite" and "adjacent" refer to the sides of a right triangle relative to angle θ.
📈

Unbounded Range

Unlike sine and cosine, tangent can be any real number — it grows without limit near its undefined angles.

⚠️

Undefined at 90°, 270°

Tangent breaks down wherever cosine is zero, since tan θ = sin θ / cos θ requires dividing by cos θ.

🔄

Reciprocal: Cotangent

Cotangent flips tangent upside down (cot = 1/tan), so it is undefined exactly where tangent equals zero.

⚙️ Why This Formula Works

On the unit circle, the point at angle θ has coordinates (cos θ, sin θ). The line from the origin to that point has a slope of rise/run = sin θ/cos θ, which is exactly the definition of tangent — so tangent is literally the geometric slope of the angle's terminal ray.

🎯 When to Use Tangent

  • Right triangles: when you know the angle and adjacent side and need the opposite side, or vice versa
  • Slope & grade: expressing an incline's steepness as rise over run
  • Angle of elevation: finding height from a known horizontal distance and measured angle

📋 Assumptions

  • The angle is a real number, entered as a plain decimal
  • Degrees convert to radians via rad = degrees × π/180
  • Tangent and cotangent near a zero denominator are treated as exactly undefined within a tiny numerical tolerance

⚠️ Limitations of the Formula

  • Tangent is undefined at 90°, 270°, and every angle coterminal with them
  • Cotangent is undefined at 0°, 180°, 360°, and every angle coterminal with them
  • Results are rounded floating-point approximations, not exact symbolic values
Walkthrough

Step-by-Step: How to Use the Tan Calculator

From entering an angle to reading the tangent and cotangent

Enter your angle

Type the angle value into the input field — any real number, positive or negative, is accepted.

Choose degrees or radians

Select which unit your angle is measured in using the toggle above the input.

Click "Calculate"

The calculator converts your angle to radians internally and evaluates tangent as sine divided by cosine, checking for a zero denominator first.

Read the tangent value

See the tangent result, or "Undefined" if the angle is 90°, 270°, or coterminal with them.

Check the cotangent

Review the reciprocal cotangent value, which is labeled "Undefined" whenever the angle is 0°, 180°, 360°, or coterminal with them.

Example

Worked Example

Finding the tangent and cotangent of a 45° angle

Scenario

A ramp rises at a 45° angle. What is the tangent of that angle (its slope), and what is its reciprocal cotangent?

Angle45°
In Radians≈ 0.785398
QuadrantI (positive)
Step 1 — Convert to radians: rad = 45 × π/180 ≈ 0.785398.
Step 2 — Evaluate sine and cosine: sin 45° ≈ cos 45° ≈ 0.707107.
Step 3 — Compute tangent: tan 45° = 0.707107 ÷ 0.707107 = 1.
Step 4 — Compute cotangent: cot 45° = 1 ÷ 1 = 1.
tan 45°
1
cot 45°
1

Undefined cases: at 90°, cos 90° ≈ 0, so tan 90° is Undefined (while cot 90° = 0 is perfectly valid). At 0°, sin 0° = 0, so cot 0° is Undefined (while tan 0° = 0 is perfectly valid). The calculator shows exactly this mix rather than crashing or displaying "Infinity."

Interpretation

Understanding Your Tangent Result

Domain, range, and period of tangent and cotangent

FunctionDomainRangePeriod
tan θAll angles except 90°, 270°, ...All real numbers180°
cot θAll angles except 0°, 180°, 360°, ...All real numbers180°

Reading the result: the tangent value tells you the slope of the ray at your angle — a tangent of 1 means a 45° incline (equal rise and run), while very large tangent values mean the angle is approaching a near-vertical 90°.

Typical ranges: unlike sine and cosine, tangent and cotangent have no upper or lower bound — they can be any real number, and they swing from negative infinity to positive infinity across each 180° period.

Manual verification: for common reference angles, tan 0° = 0, tan 30° ≈ 0.5774, tan 45° = 1, tan 60° ≈ 1.7321, and tan 90° is undefined — a quick way to check the calculator's output by hand.

Use Cases

Practical Use Cases for the Tan Calculator

Where finding a tangent value is genuinely useful

🎓

Trigonometry homework

Check tangent values for right-triangle and unit-circle problems.

🛣️

Road slope & grade calculation

Convert an incline angle into a percentage grade using tan θ.

📏

Height from angle of elevation

Find a building or tree's height from a baseline distance and elevation angle in surveying.

🏠

Roof pitch calculation

Express a roof's steepness as a tangent-based rise-over-run ratio.

📸

Camera field-of-view calculations

Compute the visible frame width from a lens angle and distance.

🧗

Ramp & accessibility design

Verify a wheelchair ramp's slope meets required tangent-based limits.

🧭

Navigation & bearing calculations

Find a bearing angle from north and east distance components.

⚙️

Mechanical & gear angle design

Compute gear tooth or cam profile angles that rely on tangent ratios.

🏗️

Structural load angle analysis

Determine force direction ratios in angled support members.

🎮

Game development & graphics

Compute view angles and aiming trajectories using tangent-based math.

📊

Physics vector angle problems

Find the angle of a resultant vector from its horizontal and vertical components.

🧮

Quick reference lookup

Get an instant tangent value for any angle without a textbook or table.

Pros & Cons

Advantages and Limitations

What this tan calculator does well, and where it doesn't apply

✅ Advantages

  • Free, instant, and requires no signup or account
  • Runs entirely in your browser — no data ever leaves your device
  • Accepts both degrees and radians with a simple toggle
  • Also computes the reciprocal cotangent automatically
  • Correctly labels both tangent and cotangent as "Undefined" instead of showing an error or huge number
  • Directly useful for slope, grade, and angle-of-elevation problems
  • Accepts negative angles and angles beyond 360° or 2π
  • Useful across coursework, surveying, construction, and engineering contexts alike
  • Fast-loading and fully mobile-friendly
  • Consistent, error-free results every time
  • Free to use as many times as needed, with no calculation limit

⚠️ Limitations

  • Tangent cannot return a value at 90°, 270°, and coterminal angles — genuinely undefined there
  • Cotangent cannot return a value at 0°, 180°, 360°, and coterminal angles for the same reason
  • Results are decimal approximations, not exact symbolic forms (e.g. it won't show √3 as a surd)
  • Does not solve a full right triangle for missing sides — it only evaluates the tangent ratio itself
  • Does not compute the inverse (arctangent) function to find an angle from a tangent value
  • Assumes the angle is entered in the unit selected by the toggle — mismatches produce misleading results
  • Does not visualize the angle on a unit circle diagram
Reference

Tan vs Sin vs Cos at Common Angles

How tangent compares to sine and cosine at 0°, 30°, 45°, 60°, and 90°

Angletansincos
001
30°0.5773500.50.866025
45°10.7071070.707107
60°1.7320510.8660250.5
90°Undefined10

Common Mistakes and Expert Tips

❌ Common Mistakes

  • Entering an angle in radians while the toggle is set to Degrees (or vice versa)
  • Assuming tan will show a huge number near 90° instead of recognizing the value is genuinely undefined
  • Confusing tangent (opposite/adjacent) with sine (opposite/hypotenuse) when solving a right triangle by hand
  • Forgetting cotangent is undefined at a completely different set of angles (0°, 180°, 360°) than tangent (90°, 270°)
  • Mixing up which quadrants make tangent negative versus positive
  • Rounding sine and cosine too early before dividing them to get tangent by hand, compounding small errors

💡 Expert Tips & Best Practices

  • Remember tan θ = rise/run — the same idea as slope — to quickly sanity-check a road, ramp, or roof calculation
  • Pair this with the Sin Calculator and Cos Calculator when you need all three primary ratios
  • Use the Trigonometry Calculator if you need all six ratios of the same angle at once
  • To go from a tangent value back to an angle, use the Inverse Trig Calculator
  • Keep at least 6 decimal places when doing manual verification to avoid compounding rounding errors
📝

Summary: This tan calculator gives you an instant, free way to find the tangent of any angle plus its reciprocal cotangent, with undefined cases clearly flagged. Pair it with the Sin Calculator and Cos Calculator for a fuller trigonometry toolkit.

FAQ

Frequently Asked Questions

Common questions about the tangent function

What does the tan calculator compute?
It computes tan(θ), the tangent of an angle you enter in either degrees or radians, and also shows the reciprocal ratio cotangent (cot = 1/tan θ). Both are undefined at specific angles, and this calculator labels those cases clearly instead of showing an error or an enormous number.
How do you find the tangent of 45 degrees?
Convert 45° to radians (45 × π/180 ≈ 0.785398) and evaluate tan θ = sin θ / cos θ. Since sin 45° and cos 45° are equal (both ≈ 0.707107), tan 45° = 1 exactly.
Why is tangent undefined at 90 degrees?
Because tan θ = sin θ / cos θ, and cos 90° = 0. Dividing by zero has no defined result, so tan is undefined at 90°, 270°, and every angle coterminal with them. This calculator detects that condition using a small numerical tolerance and displays "Undefined" instead of "Infinity."
Why is cotangent undefined at 0 degrees?
Cotangent is defined as cot θ = cos θ / sin θ, and sin 0° = 0. The same division-by-zero issue applies at 180°, 360°, and every multiple of 180°, so cotangent is reported as Undefined at those exact angles.
What is the range of the tangent function?
Unlike sine and cosine, tangent's range is all real numbers — it can take on any value from negative infinity to positive infinity, growing without bound as the angle approaches 90° or 270°.
What is the period of the tangent function?
Tangent repeats every 180° (half the period of sine and cosine, which repeat every 360°). This means tan(45°) and tan(225°) are exactly the same value, since 225° is 45° plus 180°.
How is tangent related to slope?
Tangent equals "rise over run" for the angle a line makes with the horizontal — exactly the same ratio used to describe a slope or grade. A road with a 5° incline has a grade of tan(5°) ≈ 0.0875, or about 8.75%.
How does degrees vs radians affect the tangent calculation?
The underlying tangent value only depends on the actual angle, not the unit used to describe it — tan(45°) and tan(π/4 radians) are the same number. This calculator converts degrees to radians internally (rad = degrees × π/180) so you can enter either unit and get the same correct result.
Can tangent be negative?
Yes. Tangent is negative in Quadrant II (90°–180°) and Quadrant IV (270°–360°), where sine and cosine have opposite signs. For example, tan 135° = -1 and tan 315° = -1.
How is tangent used in real-world applications?
Tangent finds the slope or grade of a road or ramp, calculates a building's or tree's height from an angle of elevation in surveying, computes roof pitch, and appears throughout physics and engineering wherever a rise-over-run ratio is needed.
What is TOA in SOHCAHTOA?
TOA stands for "Tangent = Opposite over Adjacent" — in a right triangle, the tangent of an acute angle equals the length of the side opposite that angle divided by the length of the side adjacent to it.
How accurate is this tan calculator?
It uses standard double-precision floating point math and displays results rounded to six decimal places. Near 90°, 270°, or their multiples, the calculator checks for a near-zero cosine and reports "Undefined" rather than a misleadingly huge number.
Does this calculator accept negative angles?
Yes. Negative angles are measured clockwise instead of counterclockwise from the positive x-axis, and tangent handles them correctly — for example, tan(-45°) = -1, the negative of tan(45°).
What's the difference between this and the full trigonometry calculator?
This tool focuses specifically on tangent and its reciprocal cotangent, which is faster when that's all you need. The full Trigonometry Calculator computes all six ratios — sin, cos, tan, cot, sec, and csc — from one angle at once.
Learn More

Authoritative Resources on Tangent

Trusted educational references to go deeper on the tangent function

Related Calculators

Explore other trigonometry tools