Right Triangle Calculator: Sides, Area, Angles

Solve a right triangle from two legs or a leg and the hypotenuse — get the third side, perimeter, area, all three altitudes, and both acute angles.

Loading calculator…

Right triangle formulas

A right triangle has one 90° angle. The two legs aa, bb meet at that angle; the hypotenuse cc (always the longest side) is opposite it, and the three sides satisfy the Pythagorean theorem a2+b2=c2a^2+b^2=c^2.

Given any two sides, this calculator solves the third, then derives the full triangle:

QuantityFormula
PerimeterP=a+b+cP = a+b+c
Semi-perimeters=P/2s = P/2
AreaK=ab2K = \dfrac{ab}{2}
Altitude to aaha=bh_a = b
Altitude to bbhb=ah_b = a
Altitude to cchc=abch_c = \dfrac{ab}{c}
Acute angle AAA=arctan(a/b)A = \arctan(a/b)
Acute angle BBB=90°AB = 90° - A
Tip: Two of the three altitudes are just the other leg — ha=bh_a = b and hb=ah_b = a — because the legs are already perpendicular to each other. Only hch_c, the altitude to the hypotenuse, needs its own formula.

Solving from two legs

Example: legs a = 6, b = 8

c=62+82=100=10P=6+8+10=24s=12K=6×82=24c = \sqrt{6^2+8^2} = \sqrt{100} = 10 \qquad P = 6+8+10 = 24 \qquad s = 12 \qquad K = \frac{6\times8}{2}=24

ha=8hb=6hc=6×810=4.8h_a = 8 \qquad h_b = 6 \qquad h_c = \frac{6\times8}{10} = 4.8

A=arctan(6/8)36.87°B=90°36.87°53.13°A = \arctan(6/8) \approx 36.87° \qquad B = 90° - 36.87° \approx 53.13°

Since 100 is a perfect square, the hypotenuse comes out exactly whole. Not every pair of legs does — legs 1 and 1 give a hypotenuse of 2\sqrt{2}, an irrational number, even though the area (0.50.5) is still exact.

Solving from a leg and the hypotenuse

Example: leg a = 5, hypotenuse c = 13

b=13252=144=12P=5+12+13=30K=5×122=30b = \sqrt{13^2-5^2} = \sqrt{144} = 12 \qquad P = 5+12+13=30 \qquad K = \frac{5\times12}{2}=30

hc=5×12134.6154A=arctan(5/12)22.62°h_c = \frac{5\times12}{13} \approx 4.6154 \qquad A = \arctan(5/12) \approx 22.62°

This is the well-known 5-12-13 triple. Entering a hypotenuse that isn't longer than the known leg — say c = 5 with a leg of 8 — has no solution; the calculator flags it rather than showing a nonsensical result.

Common mistakes

  • Mixing up the altitude to the hypotenuse with a leg. hc=ab/ch_c = ab/c is a distinct length from both legs — for a 6-8-10 triangle it's 4.8, not 6 or 8.
  • Using the hypotenuse in the area formula. K=ab/2K = ab/2 only works with the two legs, since they're the perpendicular pair; using the hypotenuse instead gives a meaningless number.
  • Forgetting the hypotenuse must be the longest side. A right triangle can't close if the "hypotenuse" you enter is shorter than (or equal to) the other known leg.

Where this shows up

  • Construction and measurement: any 90°-angle layout problem — squaring a foundation, cutting a roof rafter, laying out a ramp — reduces to a right triangle.
  • Trigonometry: the right triangle is the foundation of sine, cosine, and tangent; its two acute angles here are found the same way any right-triangle angle is.
  • Related shapes: an isosceles right triangle and an equilateral triangle split down the middle are both special cases built from the same right-triangle relationships.

This calculator is a direct extension of the Pythagorean Theorem calculator — it solves the same missing-side problem, then goes further to derive the full triangle: perimeter, area, every altitude, and both acute angles. It's also closely related to the isosceles triangle (a right isosceles triangle is just this shape with a=ba=b), the Law of Sines, and the equilateral triangle.

Frequently asked questions

What is a right triangle?
A triangle with exactly one 90° angle. The two shorter sides meeting at the right angle are the legs (aa, bb); the side opposite the right angle, always the longest, is the hypotenuse (cc). They satisfy a2+b2=c2a^2+b^2=c^2.
How do I find the area of a right triangle?
The two legs are perpendicular, so one can serve as the base and the other as the height: K=ab2K = \frac{ab}{2}. For legs 6 and 8, K=6×82=24K = \frac{6 \times 8}{2} = 24.
How do I find the third side if I only know two sides?
Given both legs, c=a2+b2c = \sqrt{a^2+b^2}. Given the hypotenuse and one leg, rearrange to b=c2a2b = \sqrt{c^2-a^2}. Either way this calculator shows the exact simplified radical alongside a decimal approximation.
What is the altitude to the hypotenuse?
It is the perpendicular distance from the right angle down to the hypotenuse, hc=abch_c = \frac{ab}{c}. Unlike the other two altitudes (each just the OTHER leg), hch_c is a genuinely new length — for legs 6 and 8 it works out to 4.84.8.
How do I find the two acute angles?
From the two legs, angle AA (opposite leg aa) is arctan(a/b)\arctan(a/b), and angle B=90°AB = 90° - A. For legs 6 and 8, A36.87°A \approx 36.87° and B53.13°B \approx 53.13°.
Why must the hypotenuse be longer than the known leg?
The hypotenuse is always the longest side of a right triangle — it's the one opposite the 90° angle. If the entered hypotenuse isn't strictly longer than the known leg, no right triangle can close, so c² − a² would be zero or negative.
Why are two of the three altitudes just the other leg?
Because the two legs are already perpendicular to each other. The altitude to leg aa is the perpendicular distance from the opposite vertex to line aa — and that distance IS leg bb, since bab \perp a by definition of the right angle. Only the altitude to the hypotenuse needs its own formula.
How is this related to the Pythagorean theorem?
Every calculation here starts from the Pythagorean theorem, a2+b2=c2a^2+b^2=c^2, to solve the missing side. This calculator goes further, using that resolved side to derive the full triangle: perimeter, area, all three altitudes, and both acute angles.

Related calculators