Math calculator

Sum and Difference Identities Calculator

Each identity checked, not just quoted.

Each identity, checked both ways

Formula against the direct computation.

A = 30°, B = 45°

sin(A+B) = 0.96592583

Computing sin 75° directly gives 0.96592583. They agree — which is what an identity claims.

Each identity, and the direct computation beside it

Each sum and difference identity with the formula, the value it gives, and the value from computing the combined angle directly
IdentityFrom the formulaComputed directly
sin(A+B)sin A cos B + cos A sin B0.96592582630.9659258263
sin(A−B)sin A cos B − cos A sin B-0.2588190451-0.2588190451
cos(A+B)cos A cos B − sin A sin B0.25881904510.2588190451
cos(A−B)cos A cos B + sin A sin B0.96592582630.9659258263
tan(A+B)(tan A + tan B) ÷ (1 − tan A tan B)3.7320508083.732050808

The two right-hand columns agree to about 1.1e-16, which is rounding rather than a defect in the identity. If they ever diverged meaningfully, the identity would be false.

A + B

75°

the combined angle

A − B

-15°

the difference

Largest disagreement

1.11e-16

between formula and direct

Sign rule

sine keeps, cosine flips

cos(A+B) uses a MINUS

  • Each identity is evaluated BOTH ways here: through the formula, and by computing the combined angle directly. They agree to floating-point precision, and seeing them agree is the point — an identity is a claim that can be checked rather than a rule to accept.
  • The signs are the trap. cos(A + B) uses a MINUS and cos(A − B) uses a plus — the opposite of what the outer sign suggests. Sine keeps the sign; cosine flips it.
  • These are the foundation, not a curiosity: setting B = A gives the double-angle formulas, and rearranging those gives the half-angle ones. Three families, one derivation.
  • The largest disagreement between the identity and the direct computation here is 1.110e-16, which is rounding rather than a defect in the identity.

Both columns are computed independently, so the agreement between them is evidence rather than a restatement.

What this tool shows

cos(A + B) uses a minus and cos(A − B) uses a plus — the opposite of what the outer sign suggests, and the single commonest error with these. Every identity here is evaluated twice, through the formula and by computing the combined angle, so you can see them agree.

  • sin(A + B) and sin(A − B)
  • cos(A + B) and cos(A − B)
  • tan(A + B)
  • Each identity computed the direct way for comparison
  • The largest disagreement between the two routes
  • How to build exact values for angles like 75°
Formula against direct Agreement shown All five identities Exact angles from known ones

Both columns computed independently.

Updated 7 September 2026 · Works in any browser, no installation

sin(A ± B) = sin A cos B ± cos A sin B, and cos(A ± B) = cos A cos B ∓ sin A sin B. Sine keeps the sign it was given; cosine flips it. So cos(A + B) contains a minus, which is the detail that catches nearly everyone.

At a glance

Formula shown
sin(A \u00b1 B) = sin A cos B \u00b1 cos A sin B. cos(A \u00b1 B) = cos A cos B \u2213 sin A sin B \u2014 note the flipped sign. tan(A + B) = (tan A + tan B) / (1 \u2212 tan A tan B).
Scenario support
Finding an exact value for 75\u00b0 or 15\u00b0; simplifying an expression before differentiating; checking an identity you half-remember.
Educational estimate
Planning support from the values you enter — not professional advice.

The sign trap

sin(A + B) = sin A cos B + cos A sin B. Plus stays plus.

cos(A + B) = cos A cos B − sin A sin B. Plus becomes minus.

There is a reason rather than a rule to memorise. Cosine is largest at 0° and falls away in both directions, so adding two angles moves you further from the peak and the value drops faster than the individual cosines suggest. The minus is that drop.

Sanity check that always works: put B = 0. Then cos(A + 0) should be cos A, and the formula gives cos A × 1 − sin A × 0 = cos A. Correct. With a plus it would give cos A + 0, which also works — so use B = A instead: cos 2A should be cos²A − sin²A, and only the minus form gives that.

Where they come from

These are not arbitrary. They are what rotation does, and there are several routes to them.

Geometrically: draw two angles stacked, drop perpendiculars, and the identities fall out of similar triangles. This is the classical proof and it is genuinely visual.

By rotation matrices: rotating by A and then by B is the same as rotating by A + B. Multiplying the two matrices out and comparing entries gives both identities at once.

By Euler’s formula: e^(i(A+B)) = e^(iA) × e^(iB). Expanding both sides and matching real and imaginary parts gives cosine and sine respectively. This is the quickest derivation and the one that explains why the signs behave as they do — the minus comes from i².

Building exact values

The sixteen unit-circle angles are not the only ones with exact values. Any sum or difference of two of them has one too.

75° = 45° + 30°. So sin 75° = sin 45° cos 30° + cos 45° sin 30° = (√6 + √2)/4.

15° = 45° − 30°. So sin 15° = (√6 − √2)/4.

That extends the exact table to every multiple of 15°, and combining with the half-angle formulas extends it to 7.5° and beyond. The page gives the decimals; the surd form comes from doing the substitution by hand, which is what an exam is usually asking for.

The cofunction identities

Put A = 90° into the difference formulas and something useful falls out.

cos(90° − B) = cos 90° cos B + sin 90° sin B = 0 + sin B = sin B.

So cos(90° − θ) = sin θ, and by the same route sin(90° − θ) = cos θ. Each function of an angle equals the co-function of its complement.

This is where the “co” in cosine comes from: it is the complementary sine. The same holds for tangent and cotangent, and for secant and cosecant.

In a right triangle it is obvious: the two acute angles are complementary, and one angle’s opposite side is the other’s adjacent.

What they are for

Combining waves. Adding two sinusoids of the same frequency gives another sinusoid, and the sum formulas are what prove it and what give the resulting amplitude and phase. Every interference calculation rests on this.

Rotation. Rotating a point by A and then by B is one rotation by A + B, and the identities are that statement in coordinates. Graphics and robotics use them constantly.

Simplifying before calculus. An expression rewritten as a single trigonometric function of a compound angle is usually far easier to differentiate or integrate than the product it started as.

Deriving everything else. The double, half, product-to-sum and sum-to-product identities are all consequences of these five. Learning these makes the rest derivable rather than memorable.

Product to sum

Add the two cosine identities together and the sine terms cancel: cos(A − B) + cos(A + B) = 2 cos A cos B.

Rearranged, that is a product turned into a sum: cos A cos B = ½[cos(A − B) + cos(A + B)]. The other three product-to-sum identities come out the same way, by adding or subtracting the appropriate pair.

It matters because sums integrate and products do not. Turning cos 3x cos 5x into ½[cos 2x + cos 8x] converts an intractable integral into two immediate ones.

It is also the mathematics behind beats: multiplying two nearby frequencies produces a sum and a difference, and the difference is the slow throb you hear when two instruments are almost in tune.

Sources and methodology

The identities are foundational and standard; these are the references.

Method. Each identity is evaluated through its formula from sin A, cos A, sin B and cos B, and separately by computing the combined angle and taking its sine or cosine directly. Those are genuinely different routes through the arithmetic, so agreement between them is evidence rather than a restatement — and the page reports the largest disagreement so the reader can see it is rounding. The suite runs the comparison across four hundred and forty-one angle pairs. That engine is verified on every change against 71 hand-written assertions, including that all four sum and difference identities match a direct computation of the combined angle across four hundred and forty-one angle pairs. The count and the per-case breakdown are published on the formula verification page.

Related calculators

Where this goes next:

Double and Half Angle2θ and θ/2 on one page, with all three forms of cos 2θ evaluated and the half-angle ± resolved from the quadrant of θ/2 — not of θ.
Trigonometric FunctionsAll six functions at once with exact surd values at the sixteen special angles — and tan 90° reported as undefined rather than as the 1.6 × 10¹⁶ a double returns.
Unit CircleWhere an angle lands, with exact surd coordinates and the radian measure as a multiple of π — because the coordinates ARE the cosine and sine.
Inverse Trigonometric FunctionsThe principal value AND the general solution, because a calculator hands you one member of an infinite family and the context decides which one your problem wants.
Phase ShiftAmplitude, period, phase shift and midline for y = A sin(Bx + C) + D — with the shift computed as −C/B, which is the step everyone skips.
Special Right Triangles30-60-90 and 45-45-90 from any one side, in exact surd form as well as decimals — with the warning that the long leg is √3 times the short, not twice.

More in Math, or browse all calculators.

Read the guide

Setting B = A in these gives the double-angle formulas, and rearranging those gives the half-angle ones — the Double and Half Angle Calculator carries that step through with the ± resolved.

Educational use disclaimer

This is an educational tool. Both columns are computed independently in double precision; a disagreement in the last digit or two is rounding, and anything larger would mean the identity was false.

How we calculate · Found an error? email us

Authorship & verification

Written and maintained by , a business operator who builds spreadsheet-based calculators.

What's changed (3 updates)

Published 7 September 2026

  1. Published the sum and difference identities with each one evaluated BOTH ways — through the formula and by computing the combined angle directly — because an identity is a claim that can be checked rather than a rule to accept.
  2. Names the sign trap: cos(A + B) uses a minus and cos(A − B) uses a plus, the opposite of what the outer sign suggests.
  3. Points out that these are the foundation rather than a curiosity — setting B = A gives the double-angle formulas and rearranging those gives the half-angle ones.

Add this calculator to your site

Responsive embed — and private: nothing your visitors type leaves their browser.