Right Triangle Calculator

Right Triangle Calculator. Enter any two known values of a right triangle — Side a, Side b, Side c (hypotenuse), or Angle A — and this calculator solves the remaining sides, angles, area, and perimeter using the Pythagorean theorem and trigonometry. Leave unknowns blank and let the calculator fill them in. Also try the Area Calculator.

Right Triangle Calculator inputs

One of the two shorter sides (leg) of the right triangle

The other shorter side (leg) of the right triangle

The longest side, opposite the 90° angle

°

Acute angle opposite Side a (must be between 0° and 90°)

°

Acute angle opposite Side b (must be between 0° and 90°)

Results

Hypotenuse (c)

--

Side a

--

Side b

--

Angle A

--

Angle B

--

Area

--

Perimeter

--

Use this right triangle calculator to turn two known values, at least one of them a side, into a complete triangle: you get the missing sides, both acute angles, and the area and perimeter, with the working behind each number. See also our Triangle Calculator.

How the Right Triangle Calculator Solves Missing Sides

Picture a diagram with one square corner. The two legs, called a and b, meet at that right angle, and the longest side, c, sits across from it. That slope is the hypotenuse. Angle A faces side a, angle B faces side b, and the third corner is 90°.

You only need two sides, or one side plus an acute angle. Keep your side lengths in the same units, and set the angle units to match how you wrote the value. Labelling right triangle dimensions on a sketch first stops numbers landing in the wrong box.

You knowThe calculator finds firstRule used on the right triangle
a and bHypotenusea² + b² = c²
One side and cOther sideSubtract squares, then take the square root
c and one acute angleBoth shorter sidesTrigonometric functions
a or b and one sharp cornerThe remaining sidesTangent, then the theorem

Two Legs, or One Leg and the Hypotenuse

With both short sides, square each one, add the results, and take the square root. With a known leg and the hypotenuse, reverse it: subtract the smaller square from the larger one, then root the answer to find the missing side.

For example, c = 9.7 cm with one side of 4.1 cm leaves \(\sqrt{94.09 - 16.81} = \sqrt{77.28}\), so the third side is about 8.79 cm. A leg as long as the slope means the entry is wrong.

A Side and an Angle

When you have a side and an angle, trigonometry takes over. Suppose the hypotenuse is 8.2 cm and one corner is 27°. The facing side comes from sine: \(a = 8.2 \times \sin 27^\circ\), about 3.72 cm. The neighbour comes from cosine: \(b = 8.2 \times \cos 27^\circ\), about 7.31 cm.

Check whether your device expects degrees or radians before you solve by hand. An angle of 27° is roughly 0.4712 radians, and mixing the two gives a believable but wrong length.

Pythagorean Theorem and Key Formulas

The Pythagorean theorem links the three sides of any triangle that has a 90° corner:

$$a^2 + b^2 = c^2$$

A little algebra rearranges it to \(c = \sqrt{a^2 + b^2}\) or \(b = \sqrt{c^2 - a^2}\). A dedicated Pythagorean theorem calculator stops there; this tool carries on to the corners and measurements below.

Waterfall chart showing leg squares of 54.76 and 110.25 square metres adding to a hypotenuse square of 165.01
How the squares of a and b build c² before you take the root.

Formulas for Area, Perimeter and Altitude

Because the legs already meet at 90°, they act as base and height. That keeps the triangle area formula short.

ResultFormula for a right triangle
Areaa × b ÷ 2
Perimetera + b + c
Altitude to the hypotenusea × b ÷ c

The height to the hypotenuse runs from the square corner to the slope. It splits the shape into two smaller copies of the original, whose areas must add up to the whole right triangle area.

Find the Angles With a Right Angle Calculator

To get the angles from sides, use an inverse trig function: \(A = \tan^{-1}(a \div b)\). If you know one side and the slope, divide the side by the slope, then press ARCSIN (often shown as sin⁻¹) for the facing corner, or ARCCOS for the corner beside that side.

The interior angles total 180°, so the other two angles add to 90°; find one and subtract. A right angle calculator relies on this shortcut. Each angle depends only on the ratio of sides, so doubling every length leaves the corners unchanged. You might also find our use the Arc Length Calculator useful.

Line chart of angle A rising with the ratio of leg a to leg b, marked at 35.17, 45 and 60 degrees
The curve flattens as the ratio grows, so equal length changes move the corner unequally.

SOH CAH TOA Step-by-Step

The memory aid SOH CAH TOA keeps the three ratios straight:

  • Pick your corner, then name the opposite side, the adjacent side and the hypotenuse.
  • Sine is opposite over hypotenuse.
  • Cosine is adjacent over hypotenuse.
  • Tangent is opposite over adjacent, so it suits two legs.
  • Divide the two values you know, then press the matching inverse key on your calculator.

Worked Example: Right Triangle Area and Perimeter

This worked example shows every line of the working. Say you are laying out a corner bed with sides of 7.4 m and 10.5 m around the square corner.

  1. Square and add: 54.76 + 110.25 = 165.01.
  2. Take the root: c is 12.85 m.
  3. Find the corner facing a (call it A): tan⁻¹(7.4 ÷ 10.5) = 35.17°.
  4. Subtract from 90°: B is 54.83°.
  5. Halve a × b: the area is 38.85 m².
  6. Add all sides: the perimeter is 30.75 m.
  7. Divide 77.7 by 12.85: the height to the hypotenuse is 6.05 m.

Basic geometry confirms it: half of 12.85 × 6.05 returns about 38.9 m², matching within rounding.

Scale diagram of a right triangle with legs 7.4 m and 10.5 m, a 12.85 m hypotenuse, 6.05 m altitude and angles of 35.17 and 54.83 degrees
The example drawn to scale, with every solved measurement labelled.

Sizing a Door Ramp as a Right Triangle

I want a back-door ramp to fit in 4.85 m of level yard. My legs are a rise of 0.457 m (side a) and a horizontal run of 4.85 m (side b).

I use a right triangle calculator with steps so I can follow the working. It adds the squares (0.2088 + 23.5225), roots 23.7313 and returns a hypotenuse of 4.871 m. The inverse tangent of 0.457 ÷ 4.85 gives 5.38°, a slope of about 1:10.6. The 2010 ADA Standards cap a ramp run at 1:12, or 4.76°, so this is too steep. That standard also requires level landings at both ends. I use it as my benchmark for a private home.

Next I keep the rise and enter an angle of 4.7636°. The missing side, the run, is 5.484 m, with a sloped length of 5.503 m. Then I test other side lengths:

Horizontal runSlope angleWithin 1:12?
4.85 m5.38°No
5.20 m5.02°No
5.49 m4.76°Yes

One trap stands out. A 5.50 m board sounds long enough, but as the sloped edge, the Pythagorean theorem leaves it a run of only 5.481 m, 3 mm short. I check which side I taped.

My call: plan a 5.49 m run, finding 0.64 m more yard plus landing space, or turn the route along the wall. Rise matters most, since each extra 10 mm adds 120 mm of run. Before cutting, I would re-level the threshold and check local building rules, which right triangle dimensions cannot settle.

Special Right Triangles and Pythagorean Triples

A Pythagorean triple is a set of integers that fits the rule exactly, such as 11, 60, 61 or 12, 35, 37. Scaled Pythagorean triples, like 33, 180, 183, keep the corner square.

45-45-90 and 30-60-90 Shapes

Two special right triangles let you skip the trig keys:

Triangle typeSide ratioSample result
45-45-901 : 1 : √2Sides of 6.2 give c = 8.77
30-60-901 : √3 : 2Short side 4.3 gives 7.45 and c = 8.6

The first is an isosceles right triangle. In the second, the side facing 30° is always half the hypotenuse.

Common Triangle Mistakes Pythagoras Will Not Catch

Before you trust a solved right triangle, check your entries and any hand-worked c, area, perimeter or angle against these slips.

  • Adding squares when you are solving for a shorter side. Subtract instead.
  • Forgetting to halve a × b when you want area.
  • Using c as the base without its matching height.
  • Mixing metres and centimetres, which distorts the perimeter and every corner.
  • Rounding c early, then reusing it in later steps.

Where Pythagoras Solves Triangle Jobs: Ladders, Ramps and Roofs

A ladder against a wall forms a right triangle: enter the wall height as a and the ground distance as b to get its length c and lean angle. A ramp works the same way from rise and run. For roof pitch or a stair stringer, one tape measurement across and one up reveal the sloped length.

To test a square corner on site, mark 1.4 m along one edge and 2.2 m along the other. Entering those marks as a and b gives the target diagonal, so it should read about 2.61 m. Check out our calculate Triangle Area (Heron's Formula) as well.