ForHosting KIT · Math

Tangent of difference of angles calculator

Get the tangent of one angle minus another without expanding sines and cosines: 75° minus 30° leaves 45°, and tan(A − B) comes out as exactly 1. Each step of the formula is shown. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
A
75
B
30
You get
A degrees
75 degrees
B degrees
30
A radians
1.308996939
B radians
0.5235987756

The tangent of a difference of two angles is a staple identity in school trigonometry, exam prep, surveying notebooks, and computer graphics rotations. Students often remember sin and cos of A minus B but stall when asked for tan(A−B) without first expanding everything into sines and cosines. This tangent of difference of angles calculator accepts two finite angles A and B, applies the compact formula (tan A minus tan B) over one plus their product, and returns the numerical value together with intermediate tan A, tan B, numerator, and denominator so you can show the work.

What tan(A − B) means and the classical identity

In real trigonometry the tangent of an angle is the ratio of sine to cosine, undefined wherever cosine is zero—odd multiples of ninety degrees or π over two radians. For a compound angle formed as the difference of two measures A and B, you could always expand sin(A−B) and cos(A−B) with the angle-difference formulas and then divide.

Algebraically simplifying that quotient yields a single compact identity that uses only the tangents of the separate angles: tan of A minus B equals open parenthesis tan A minus tan B close parenthesis divided by open parenthesis one plus tan A times tan B close parenthesis. That identity is the entire computational core of this capability. It is exact in the reals wherever both tan A and tan B exist and the denominator is not zero.

When the denominator approaches zero, the difference angle itself is approaching an odd multiple of ninety degrees, so tan(A−B) has a vertical asymptote and no finite real value. Classroom worksheets and contest problems lean on this form because it avoids intermediate sine and cosine expansions when only the tangent is required, and because it pairs cleanly with the companion sum identity that swaps the middle sign.

Where a tan(A−B) calculator earns its keep in practice

Homework platforms and tutoring apps need a deterministic oracle for difference-of-angles items so learners can check tan of seventy-five minus thirty without expanding four trig functions by hand and without a full computer-algebra stack. Exam generators and LMS plugins mark answers against the same identity the textbook prints, including hard fails when A or B sits on a vertical asymptote—exactly the traps that appear in multiple-choice distractors.

Graphics and game tools that rotate frames sometimes expose the compound-angle identity in debug panels so artists can verify that a relative heading produces the expected slope. Content sites that rank for tangent of difference of angles calculator benefit from a dedicated slug and English landing that matches the exact search phrase, while the free in-browser path matches the paid automation path byte-for-byte on the shared solve module.

Use it whenever the question is specifically tan of A minus B—not the full suite of sin, cos, and sum—so the educational narrative and the SEO intent stay aligned.

Classroom checks for the tan(A−B) identity

Students enter angles A and B, see tan A, tan B, numerator, denominator, and tan(A−B), and compare against hand work on homework sheets.

LMS and exam auto-grading

Score difference-of-angles items with a deterministic oracle that rejects undefined asymptote cases instead of returning infinity.

Surveying, bearings, and relative headings

Compute tan of an azimuth difference for slope or grade scripts without importing a full computer-algebra system.

What formula does the tangent of difference calculator use?

It uses tan(A−B) = (tan A − tan B) / (1 + tan A · tan B). The response also returns tan A, tan B, numerator, and denominator so you can show intermediate steps.

When is tan(A−B) undefined?

When tan A or tan B is undefined (A or B is an odd multiple of 90° / π/2), or when 1 + tan A·tan B is effectively zero, which means A−B itself sits on a vertical asymptote.

Are angles in degrees or radians?

Degrees by default. Set unit to "radians" (or "rad") when both a and b are already in radian measure. The response reports both units for convenience.

How is this different from a full sum-and-difference angle calculator?

This capability evaluates only tan(A−B) with the tangent-difference identity. It is a focused landing for that identity; a broader sum/difference tool covers sin, cos, and both sum and difference combinations.

Why is tan(75° − 30°) exactly 1?

The difference is 45°, whose tangent is 1. In the formula, the numerator and the denominator both come to 3.154700538379, so dividing one by the other gives exactly 1.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/trig/tan-difference

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/trig/tan-difference \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"a":75,"b":30}'
{
  "a": 75,
  "b": 30
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "trig.tan_difference",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

When either individual tangent is undefined, or when the combined denominator vanishes because A minus B sits on a vertical asymptote, the task fails with invalid_input instead of inventing infinity.

What tan(A − B) means and the classical identity

This endpoint evaluates the difference form only, so search intent for a dedicated tangent-of-difference landing stays focused rather than drowning in a full sum-and-difference suite.

Input contract, units, response fields, and undefined cases

Unit defaults to degrees; set it to radians (or short forms deg and rad) when both measures are already in radian form. The formula string restates the identity for display next to the answer. POST a JSON object with two required finite numbers a and b—the minuend and subtrahend angles—and an optional unit string. Numeric fields may arrive as JSON numbers or as plain numeric strings; booleans, objects, empty strings, and non-finite values fail with invalid_input naming the field. On success the body echoes a, b, and unit; reports both angles in degrees and in radians for convenience; reports the difference A minus B in both units; returns tan_a, tan_b, the numerator tan A minus tan B, the denominator one plus their product, and tan_difference as the final finite value rounded to twelve decimal places for stable automation. Failure modes are intentional and explicit: if cos A or cos B is effectively zero then tan A or tan B is undefined and the call is rejected; if the denominator is effectively zero then tan of the difference is undefined and the call is rejected with a message that names the vertical asymptote. Those validation failures are not billed. Successful calls cost the published $0.002 base price on the API; the browser tool remains free for interactive checks. Keep angles within a generous absolute bound so floating-point trig stays meaningful, and pin the rounded tan_difference in your tests rather than re-deriving it by hand each release.

Where a tan(A−B) calculator earns its keep in practice

Surveying and navigation notebooks combine azimuths and bearings as angle differences and often need only the tangent for slope or grade calculations; a tiny parse API avoids shipping a symbolic library into an edge worker.

What does the tangent of difference of angles calculator cost?

The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.

Read the full KIT documentation →