Ad Space — Top Banner

Law of Tangents

Relate the sides and angles of any triangle using tangent.
An alternative to the law of cosines for solving triangles.

The Formula

(a - b) / (a + b) = tan((A - B)/2) / tan((A + B)/2)

The law of tangents provides another way to solve triangles when you know two sides and the included angle. It can be more numerically stable than the law of cosines for certain calculations.

Variables

SymbolMeaning
a, bTwo sides of the triangle
A, BAngles opposite to sides a and b respectively

Example 1

In a triangle: a = 8, b = 5, angle C = 60°. Find angles A and B.

A + B = 180° - 60° = 120°, so (A+B)/2 = 60°

(8-5)/(8+5) = tan((A-B)/2) / tan(60°)

3/13 = tan((A-B)/2) / 1.732

tan((A-B)/2) = 0.2308 × 1.732 = 0.3997

(A-B)/2 = 21.8°, so A-B = 43.6°

A = (120 + 43.6)/2 = 81.8°, B = (120 - 43.6)/2 = 38.2°

Example 2

a = 12, b = 12 (isosceles triangle), C = 40°

(12-12)/(12+12) = 0/24 = 0

tan((A-B)/2) = 0, so A-B = 0

A = B = (180 - 40)/2 = 70° (confirms the triangle is isosceles)

When to Use It

Use the law of tangents when:

  • Solving triangles with two known sides and the included angle (SAS)
  • Needing a direct formula without intermediate cosine calculations
  • Working with surveying and navigation problems
  • Checking results obtained from the law of sines or cosines

Ad Space — Bottom Banner

Embed This Calculator

Copy the code below and paste it into your website or blog.
The calculator will work directly on your page.