Skip to content

Right Triangle Calculator

Enter two sides of a right triangle (two legs, or a leg and the hypotenuse) to get the missing side, the two acute angles, the area and the perimeter.

Calculator Details

Area:30 sq unitsSee results ↓

Use when you know two sides of a right triangle

Pythagorean method only: the hypotenuse c, or leg a or b

One leg of the right triangle

Other leg of the right triangle

Your Results

Area: 30 sq units

Area

30 sq units

Scalene right triangle, perimeter 30 units

Perimeter

30 units

By angles

Right Triangle

By sides

Scalene

Compare scenarios

Save these inputs as a scenario, change them, and compare the results side by side.

Loading, available in a moment

Detailed Breakdown

Sides and angles of your triangle
VertexAngleOpposite side
A22.62° (solved)a = 5 (given)
B67.38° (solved)b = 12 (given)
C90° (solved)c = 13, hypotenuse (solved)
Total180°Perimeter 30

Area 30 square units; semiperimeter 15.

How This Calculator Works

How It's Calculated

Your triangle (PYTHAGOREAN)

c = √(a² + b²) = √(5² + 12²) = 13
Area = a × b ÷ 2 = 30
  • Pythagorean theorem (right triangles): a² + b² = c², where c is the hypotenuse.
  • Law of cosines: c² = a² + b² − 2ab·cos(C). Finds a side from two sides and the angle between them (SAS), or the angles from three sides (SSS).
  • Law of sines: a/sin(A) = b/sin(B) = c/sin(C). Finds the sides once two angles are known (ASA, AAS).
  • Heron's formula: Area = √[s(s − a)(s − b)(s − c)] with s = (a + b + c)/2.
  • Shoelace formula (from coordinates): Area = |x1(y2 − y3) + x2(y3 − y1) + x3(y1 − y2)| / 2; the sign of the sum shows whether the corners run counter-clockwise (+) or clockwise (−).

Frequently Asked Questions

How do I find the angles of a right triangle from its sides?

Use inverse trigonometry. The angle opposite side a is arctan(a ÷ b), or arcsin(a ÷ c) with the hypotenuse. For legs 5 and 12, arctan(5/12) ≈ 22.62°, and the other acute angle is 90° − 22.62° = 67.38°. SOH CAH TOA reminds you which ratio uses which sides.

How do I solve a right triangle from one side and one angle?

Use the trig ratios. With hypotenuse 10 and a 30° angle, the opposite leg is 10 × sin 30° = 5 and the adjacent leg is 10 × cos 30° ≈ 8.660. The triangle calculator's angle-side modes do this for any triangle.

What is the height of a right triangle to its hypotenuse?

Twice the area divided by the hypotenuse: h = ab ÷ c. For the 5-12-13 triangle it is 60 ÷ 13 ≈ 4.615. This altitude splits the triangle into two smaller triangles similar to the original.

How do roofers use right triangles?

A roof pitch is a right triangle: the rise over the run. A 6/12 pitch rises 6 inches for every 12 inches across, so the rafter length per 12 inches of run is √(6² + 12²) ≈ 13.42 inches and the roof angle is arctan(6/12) ≈ 26.57°.

Solves flat (Euclidean) triangles from two sides of a right triangle, SSS, SAS, ASA or AAS, or the coordinates of the three corners (shoelace formula), with angles in degrees. Results are rounded to 10 significant digits. Not included: the ambiguous SSA case (two sides and a non-included angle), spherical triangles, radians, and units (sides are in whatever unit you use).

Right Triangle Calculator: Sides, Angles, Area

By FindMySum · Last reviewed

A right triangle calculator solves any triangle with a 90° angle once you know two of its sides. The Pythagorean theorem gives the third side, simple trigonometry gives the two acute angles, and half the product of the legs gives the area. Right triangles are behind roof pitches, ramps and stairs, the diagonal of a screen or a room, and distances on a map.

Worked example

A right triangle has legs a = 5 and b = 12.

  1. Hypotenuse: c = √(5² + 12²) = √169 = 13.
  2. Angle A, opposite the 5: arctan(5 ÷ 12) ≈ 22.62°.
  3. Angle B, opposite the 12: 90° − 22.62° = 67.38°.
  4. Area: 5 × 12 ÷ 2 = 30 square units.
  5. Perimeter: 5 + 12 + 13 = 30 units.

A neat coincidence: this triangle's area and perimeter are both 30. It is one of only two right triangles with whole-number sides where that happens; the other is 6-8-10.

Choosing the unknown side

If you know the hypotenuse and one leg, solve for a leg instead: with c = 13 and a = 5, b = √(13² − 5²) = √144 = 12. The hypotenuse must be the longest side, so a "hypotenuse" shorter than a leg means the numbers are mixed up.

For 30-60-90 and 45-45-90 triangles, the special right triangles calculator gives exact ratios; for triangles without a right angle, use the triangle calculator, which also has the law of sines and law of cosines.

Sources

This article explains how the calculator works and is general information, not financial, tax, legal or medical advice. Rules change; check the sources above or a qualified professional before you act.

Spotted a wrong result or a bug? Report a problem

May we count your visits with Invoker Analytics? It keeps a random visitor number in your browser. Your calculator inputs are never sent. Privacy policy