Right Triangle Calculator

Solve a right triangle from any two known parts using the Pythagorean theorem and trigonometry, with all sides, angles and trig ratios.

How to use this calculator

  1. 1Choose which two parts you know — any two are enough to solve the whole triangle.
  2. 2Leg a is opposite angle A; leg b is opposite angle B; c is always the hypotenuse.
  3. 3The check line under the results confirms a² + b² = c² for your values.

How the calculation works

a² + b² = c² sin A = a/c cos A = b/c tan A = a/b
a, b
The two legs — the sides forming the right angle
c
The hypotenuse — always the longest side, opposite the right angle
A
The acute angle opposite leg a

The Pythagorean theorem applies only to right triangles. For any other triangle, use the law of cosines.

The two acute angles always sum to 90°, because the three angles sum to 180° and one of them is the right angle.

The altitude to the hypotenuse is the geometric mean of the two segments it divides the hypotenuse into — the basis of several classic geometry proofs.

Worked example

The 3-4-5 triangle

  1. 1.c² = 3² + 4² = 9 + 16 = 25, so c = 5.
  2. 2.sin A = 3/5 = 0.6, so angle A = 36.870°.
  3. 3.Angle B = 90 − 36.870 = 53.130°.
  4. 4.Area = ½ × 3 × 4 = 6 cm². This is the smallest Pythagorean triple and the reason builders use a 3-4-5 measurement to check a corner is square.

Result: Hypotenuse 5 cm, angles 36.87° and 53.13°

What makes a triangle "right"

A right triangle has one angle fixed at exactly 90 degrees — a perfect square corner. That single constraint makes it the most useful triangle in practical geometry, because it turns three otherwise independent measurements (two legs and a hypotenuse) into a tightly linked set: knowing any two of its six parts (sides and angles) is enough to find every other one.

The side opposite the right angle is always called the hypotenuse, and it is always the longest of the three sides — a direct consequence of the right angle being the largest angle in the triangle, since the longest side always sits opposite the largest angle.

The Pythagorean theorem

The relationship a² + b² = c² — the sum of the squares of the two legs equals the square of the hypotenuse — is one of the most famous results in mathematics, and one of the oldest. Right-triangle relationships like it were used practically, for surveying and construction, by several ancient civilisations well before they were written down as a general theorem.

What makes it more than a curiosity is how tightly it constrains a right triangle: any two of the three sides fix the third exactly, with no other possibility. That is also why a small, deliberately chosen set of whole-number side lengths — 3-4-5, 5-12-13, 8-15-17 — satisfy the relationship exactly and are worth recognising on sight.

Reading the trigonometric ratios

Once one angle and the right angle are fixed, the three side lengths and the remaining acute angle are all locked to each other through trigonometry. The three basic ratios — sine, cosine and tangent — each relate one pair of sides to one acute angle, and are usually remembered by the mnemonic SOH-CAH-TOA: sine is opposite over hypotenuse, cosine is adjacent over hypotenuse, tangent is opposite over adjacent.

These ratios are what let a right triangle be solved from just one side and one angle, without needing a second side at all — the trigonometric functions supply the missing relationship that the Pythagorean theorem alone cannot.

Where right triangles show up

Because a right angle is so easy to establish and measure against, right-triangle reasoning turns up anywhere a diagonal, a height or a distance needs to be found indirectly.

  • Constructionthe 3-4-5 rule — measuring 3 units along one wall, 4 along the other, and checking the diagonal comes to exactly 5 — is a simple, tool-free way builders confirm a corner is truly square.
  • Navigation and surveyingfinding a straight-line distance from separately measured horizontal and vertical (or north-south and east-west) legs is a direct right-triangle problem.
  • Engineering and physicsresolving a force, velocity or displacement into perpendicular components — and recombining components back into a single resultant — is right-triangle trigonometry applied directly.
  • Computer graphics and designscreen resolutions, aspect ratios and diagonal screen sizes are all quoted using the same relationship between two perpendicular measurements and a diagonal.

Two special right triangles worth knowing

Two particular right triangles come up so often that their angle-to-side ratios are worth memorising outright, rather than recalculating every time.

  • 45-45-90an isosceles right triangle, where both legs are equal and the hypotenuse is always exactly √2 times a leg — the diagonal of a square follows this ratio.
  • 30-60-90sides are always in the fixed ratio 1 : √3 : 2, which is why this triangle shows up constantly in problems involving equilateral triangles cut in half.

What this assumes, and where it stops

Assumptions

  • One angle is exactly 90°. Lengths use a consistent unit; angles are in degrees.

Limitations

  • Only right triangles. Use the general triangle calculator for anything else.
  • Angles very close to 0° or 90° lose precision, as the tangent function grows without bound.

Common questions

How do I find the hypotenuse?

Square both legs, add them, and take the square root: c = √(a² + b²). For legs of 3 and 4 that gives √25 = 5. The hypotenuse is always the longest side and always sits opposite the right angle.

What is a Pythagorean triple?

A right triangle whose three sides are all whole numbers. The smallest is 3-4-5, followed by 5-12-13, 8-15-17 and 7-24-25. Builders use the 3-4-5 relationship to check that a corner is square without needing a set square.

Can I use Pythagoras on any triangle?

No — it holds only when one angle is exactly 90°. For other triangles use the law of cosines, c² = a² + b² − 2ab·cos(C), which reduces to Pythagoras when C is 90° because cos(90°) is zero.

Formula and content last reviewed on .

Results are estimates for information only, not professional advice.

Report an error

Tools people commonly use alongside the right triangle calculator.

See all geometry calculators →