Right Triangle Calculator

Solve any right triangle from two known values — sides, angles, area and trig ratios instantly.

Ad placeholder (leaderboard)
Enjoying the tools? Go Pro for £4.99 (one-time) and remove all ads — forever, on this device. Remove ads — £4.99

A right triangle calculator that fully solves the triangle from any two known values — whether you have both legs, one leg and the hypotenuse, one leg and an acute angle, or the hypotenuse and an acute angle. Every solve gives you all three sides, both acute angles, area, perimeter, a live SVG diagram, and a complete trig ratio table for both angles.

How it works

A right triangle has exactly one 90-degree angle (labelled C in this tool). That leaves three sides (legs a, b and hypotenuse c) and two unknown angles (A and B). Because the angles must sum to 180 degrees, A + B = 90, so knowing one acute angle instantly gives the other.

Depending on which two values you provide, the calculator applies one of four solution paths:

Both legs known (a, b)

c = sqrt(a^2 + b^2) — Pythagorean theorem

A = arctan(a / b), B = 90 - A

Leg and hypotenuse known (a, c)

b = sqrt(c^2 - a^2)

A = arcsin(a / c), B = 90 - A

Leg and opposite angle known (a, A)

B = 90 - A

c = a / sin(A), b = a / tan(A)

Hypotenuse and angle known (c, A)

B = 90 - A

a = c * sin(A), b = c * cos(A)

Once all three sides are known, area and perimeter follow directly:

Area = a * b / 2, Perimeter = a + b + c

The trig ratio table is then derived from the solved sides, giving sin, cos and tan for both angle A and angle B — matching the SOH CAH TOA rules taught at GCSE, A-level and in most university engineering courses.

Worked example

Suppose a ramp rises 1.2 m vertically over a horizontal run of 5 m. What angle does it make with the ground, how long is the ramp surface, and what is the enclosed area?

  1. We know: leg a = 1.2 (vertical), leg b = 5 (horizontal).
  2. Hypotenuse: c = sqrt(1.2^2 + 5^2) = sqrt(1.44 + 25) = sqrt(26.44) ≈ 5.142 m
  3. Angle A (elevation angle) = arctan(1.2 / 5) = arctan(0.24) ≈ 13.50°
  4. Angle B = 90 - 13.50 = 76.50°
  5. Area = 1.2 * 5 / 2 = 3.0 m²

Now plug the same numbers into “Both legs” mode and the calculator confirms every figure in under a second, with all steps shown.

Known valuesLeg aLeg bHypotenuse cAngle AAngle B
a = 3, b = 434536.87°53.13°
a = 5, c = 135121322.62°67.38°
a = 1, A = 45°111.414245°45°
c = 10, A = 30°58.6601030°60°

Formula reference

The six trigonometric ratios for angle A (where a is opposite, b is adjacent, c is hypotenuse):

  • sin A = a / c (SOH)
  • cos A = b / c (CAH)
  • tan A = a / b (TOA)
  • csc A = c / a, sec A = c / b, cot A = b / a

The Pythagorean identity sin^2(A) + cos^2(A) = 1 always holds. The complementary angle identities mean sin(A) = cos(B) and cos(A) = sin(B), which the trig table illustrates directly.

All calculations run locally in your browser — no numbers are sent to any server.

Ad placeholder (rectangle)