Calculators & Converters

Right Triangle Calculator

Work out a right triangle from two legs, a hypotenuse and one leg, or one leg and its opposite acute angle. Leg a and leg b always meet at 90°. The labeled diagram and result table keep the hypotenuse and acute angles distinct.

Free online tool

Loading tool…

Right Triangle Calculator inputs

Changing the unit relabels the numbers. Convert measurements to one common unit before entering them.

Leg a is opposite angle A. Leg b is adjacent to angle A. The hypotenuse c must be the longest side. Positive measurements must be from 0.000000001 to 1,000,000,000; derived defining lengths must also remain in this range.

Calculated measurements

Hypotenuse c
5 units
All calculated values
MeasurementValue
Hypotenuse c5 units
Leg a3 units
Leg b4 units
Angle A (opposite a)36.8698976°
Angle B (opposite b)53.1301024°
Area6 units²
Perimeter12 units
Altitude to hypotenuse2.4 units
Inradius1 units
90°ABcab
Legs a and b meet at 90°. Hypotenuse c faces the right angle.

Formula: c = √(a² + b²); A = atan(a/b); area = ab/2

The angle between legs a and b is exactly 90°.

Results use full floating-point precision internally and display up to 10 significant digits. Angles are in degrees.

Calculations run locally in your browser. Measurement values are not sent to a calculation service. The downloadable text contains your selected inputs and computed results.

GET STARTED

How to use the Right Triangle Calculator

  1. 01

    Choose the known side or angle combination.

  2. 02

    Enter leg a and the other requested measurement. Angle A is opposite leg a.

  3. 03

    Use one consistent length unit and read acute angles in degrees.

  4. 04

    Compare the results with the diagram, then copy or download the calculation.

Examples

A 5–12–13 triangle

Enter leg a = 5 and leg b = 12. The hypotenuse is 13, area is 30 square units, perimeter is 30, and inradius is 2.

Recover a missing leg

For hypotenuse c = 17 and leg a = 8, leg b is 15. The remaining two angles add to 90°.

Start with an acute angle

For a = 3 and A = 30°, the hypotenuse is 6 and leg b is approximately 5.196152423. The angle must be opposite the supplied leg.

Identify the hypotenuse first

The hypotenuse faces the right angle and is longer than either leg. A slanted edge is not automatically the hypotenuse; the right angle determines its identity. In the hypotenuse input mode, c must exceed a strictly. Equal values would leave the other leg with zero length.

Recover sides and angles

The Pythagorean relation is a² + b² = c². With a hypotenuse and one leg, the missing leg is √(c² − a²). For the angle opposite a, tan A = a/b and sin A = a/c. The tool uses the two legs to recover a stable acute angle, then subtracts it from 90° for B.

Area, altitude, and the incircle

The perpendicular legs give area ab/2 directly. If the same area is written as c × altitude/2, the altitude to the hypotenuse is ab/c. The inradius is ab/(a + b + c), equivalent to (a + b − c)/2 but less sensitive to subtraction when one leg is very small.

Use a mathematical triangle appropriately

The results describe ideal straight sides and an exact right angle. A diagonal measurement can help check a rectangular layout, but the tool does not evaluate loads, ladder placement rules, survey uncertainty, or physical tolerances. Small angle measurement errors can produce substantial length changes near 0° or 90°.

What to know

  • The right angle is assumed rather than measured or verified.
  • Acute angle input is limited to 0.000001°–89.999999°; defining lengths must stay within 10⁻⁹–10⁹.

Common questions

Can I solve a triangle that is not right?

Use the general Triangle Calculator instead. This calculator fixes the angle between a and b at 90°.

What is angle A measured from?

A is the acute angle between leg b and hypotenuse c, opposite leg a. This convention matters in the leg-and-angle mode.

Why can c not equal a?

The remaining leg would be zero. A right triangle needs two positive legs and a hypotenuse strictly longer than both.

Can I mix feet and inches?

Convert the measurements to a single unit first. The unit selector relabels values and does not convert them.

Sources & references