CalculateItNow home

Right Triangle Calculator

Solve a right triangle from two sides, or a side and an angle: all three sides, both acute angles, area, perimeter, altitude, inradius and circumradius.

Right Triangle Calculator: with the default inputs, hypotenuse c is 5 m.

Try an example
Hypotenuse c
5 m
Leg a
3 m
Leg b
4 m
Angle A (opposite a)
36.8699 deg
Angle B (opposite b)
53.1301 deg
Area
6 m²
Perimeter
12 m
Altitude to the hypotenuse
2.4 m
Inradius r
1 m
Circumradius R
2.5 m
Shape
Right scalene
Assumptions
  • The right angle is at C, so c is the hypotenuse and angle A is opposite leg a.
  • Angles are in degrees by default; switch the unit for radians or gradians.
  • Results come from the two measurements the chosen mode reads, not from a least-squares fit of all four fields.
Math verified by automated testsUpdated 2026-09-092 sources cited

How this is worked out

The formula

Right angle at C, hypotenuse c, legs a and b, angle A opposite a.

  a² + b² = c²                        (Pythagoras)
  sin A = a/c,  cos A = b/c,  tan A = a/b        (SOH-CAH-TOA)
  A + B = 90°

  Area      = ½ a b
  Perimeter = a + b + c
  Altitude to the hypotenuse   h = a b ÷ c
  Inradius        r = (a + b − c) ÷ 2
  Circumradius    R = c ÷ 2      (the hypotenuse is a diameter — Thales' theorem)

Open How it’s calculated above to see this worked through with your own numbers.

What you enter

What do you know?
Only the fields the chosen pair needs are read; the rest are ignored.Both legs (a and b) · One leg (a) and the hypotenuse (c) · One leg (a) and its opposite angle A · The hypotenuse (c) and an acute angle A
Leg a
A side next to the right angle. Angle A sits opposite it.in mm, cm, m, km, in, ft, yd, mi · 0 or more · defaults to 3
Leg b
The other side next to the right angle.in mm, cm, m, km, in, ft, yd, mi · 0 or more · defaults to 4
Hypotenuse c
The longest side, opposite the right angle.in mm, cm, m, km, in, ft, yd, mi · 0 or more · defaults to 5
Angle A (opposite leg a)
Must be strictly between 0° and 90° — the third angle is already using up the other 90°.in deg · from 0 to 90 · defaults to 36.87

What you get back

Hypotenuse cmain answer
Leg a
Leg b
Angle A (opposite a)
Angle B (opposite b)
Area
Perimeter
Altitude to the hypotenuse
The perpendicular dropped from the right angle onto c.
Inradius r
Circumradius R
Always exactly half the hypotenuse.
Shape

What this assumes

  • The right angle is at C, so c is the hypotenuse and angle A is opposite leg a.
  • Angles are in degrees by default; switch the unit for radians or gradians.
  • Results come from the two measurements the chosen mode reads, not from a least-squares fit of all four fields.

About this calculator

A right triangle has three sides and three angles, but one angle is already known — it is 90° — so only two further measurements are needed to pin the whole thing down. Give it any sufficient pair and this calculator returns the rest, along with the quantities geometry problems actually ask for: area, perimeter, the altitude dropped onto the hypotenuse, and the radii of the inscribed and circumscribed circles.

Choosing what you know

Four combinations are enough:

  • Both legs. Pythagoras gives the hypotenuse directly.
  • A leg and the hypotenuse. Pythagoras rearranged. The hypotenuse must be the larger of the two, and the calculator says so plainly if it is not.
  • A leg and its opposite angle. Sine gives the hypotenuse, tangent gives the other leg.
  • The hypotenuse and an acute angle. Sine and cosine give both legs.

What is not enough is two angles: they fix the shape but nothing about the size, so there are infinitely many triangles that fit. At least one length is always required.

SOH-CAH-TOA, and why it works

Sine = Opposite / Hypotenuse, Cosine = Adjacent / Hypotenuse, Tangent = Opposite / Adjacent. Those ratios depend only on the angle, not on how big the triangle is, which is the whole reason trigonometry exists: measure an angle and one length, and every other length follows.

Angle A and angle B always add to 90°, because the three angles of any triangle add to 180° and the right angle has taken half of that. So one acute angle determines the other.

The less-obvious outputs

The altitude to the hypotenuse is the perpendicular dropped from the right angle onto the longest side. It equals ab ÷ c, because the area can be written as ½ab (using the legs) or ½ch (using the hypotenuse as base), and those must agree. It is the shortest distance from the right-angle corner to the opposite side.

The circumradius is always exactly half the hypotenuse, no exceptions. That is Thales' theorem read backwards: the hypotenuse is a diameter of the circle through all three vertices, so the right angle sits on the circle. The inradius, (a + b − c) / 2, is the radius of the largest circle that fits inside.

Precision and impossible input

Results are double precision, so a 3-4-5 triangle returns angles of 36.8699° and 53.1301° rather than anything rounder — those angles genuinely are irrational. If you enter a hypotenuse shorter than a leg, or an angle of 0° or 90°, the calculator refuses and explains why instead of returning NaN. Only the two fields your chosen mode names are read — the others are ignored entirely, so a stale value left in an unused box can never quietly corrupt the answer.

Frequently asked questions

What are the angles of a 3-4-5 triangle?

36.87° opposite the side of 3, and 53.13° opposite the side of 4 — more precisely 36.8699° and 53.1301°. They are not round numbers; the 3-4-5 triple is special because the sides are whole, not the angles.

Can I solve a right triangle from two angles?

No. The two acute angles must add to 90°, so the second tells you nothing the first did not, and no angle information fixes the size. You need at least one length.

Why is the circumradius half the hypotenuse?

Because the hypotenuse is a diameter of the circle through the three vertices. Thales' theorem says any angle drawn on a semicircle is a right angle, and the converse holds too.

What is the altitude to the hypotenuse for?

It is the height you need when you use the hypotenuse as the base, and it equals ab ÷ c. It also splits the triangle into two smaller triangles similar to the original, which is the basis of the geometric-mean relations.

Is 90° allowed as angle A?

No. Angle C is already the right angle, and a triangle's angles total 180°, so A must be strictly between 0° and 90°. The calculator rejects 0 and 90 rather than dividing by zero.

Put this calculator on your own site

A working right triangle, free for any site, with no ads and no sign-up. It resizes to fit wherever you paste it and updates itself as this page improves.

Paste this anywhere. It works on any site, carries no ads, never expires, and always shows the current version.

Right Triangle Calculator by CalculateItNow

The page's own title. The clearest description of what the link leads to.

The credit line sits outside the widget on purpose, so it is a real link on your page rather than one buried in a frame. Please keep it — it is what pays for CalculateItNow staying free and ad-free. The script only resizes the widget to fit its contents; drop it and the widget still works.

Browse every calculator widget·How to add it to WordPress, Squarespace or Wix

The questions people ask next to a right triangle.

All math calculators·Browse everything