Contact, if you are interested in this website / domain name / Sponsorship / Advertisement / Partnership: web.works/contact
000345Square-corner toolkit

Right Triangle (Pythagorean) Calculator

Solve any right triangle from two sides: hypotenuse, angles, area.

One of the two sides that meet at the right angle.
The other side at the right angle.
The longest side. Leave at 0 if unknown.

Almost every layout problem on a job site — rafter lengths, stair stringers, diagonal braces, ramp lengths, squaring corners — is a right triangle in disguise. Enter any two sides and leave the unknown one at zero. The calculator returns the missing side, both acute angles, the area and the perimeter.

The Pythagorean theorem

In a right triangle, the square of the hypotenuse equals the sum of the squares of the two legs: a² + b² = c². Rearranged, a missing leg is a = √(c² − b²). The angles come from trigonometry: angle A = arctan(a ÷ b), and angle B = 90° − A.

Worked example: a diagonal brace

A gate frame is 4 ft wide and 6 ft tall. Its brace runs corner to corner, so c = √(4² + 6²) = √52 ≈ 7.211 ft, or about 7' 2-9/16". The brace meets the bottom rail at arctan(6 ÷ 4) ≈ 56.3°, which is the angle to set on your miter saw (as 33.7° from square on most saws).

Where builders use it

  • Rafters: run and rise are the legs; the rafter is the hypotenuse. See the rafter calculator.
  • Stairs: total rise and total run give the stringer length. See the stair calculator.
  • Squaring: two wall lengths give the diagonal for a square corner. See the 3-4-5 calculator.
  • Ramps: rise and horizontal length give the ramp surface length and slope angle.
If you enter all three sides, the calculator tells you whether they actually form a right triangle — a quick way to check a frame you have already built.

Watch: how it is done

Pythagorean Theorem - Basic Introduction

The Organic Chemistry Tutor · YouTube

Video by The Organic Chemistry Tutor on YouTube. More in our video library.

Frequently asked questions

Which side is the hypotenuse?

The hypotenuse is always the longest side and is opposite the 90° angle. In a stair it is the stringer; in a roof it is the rafter.

Can I enter feet and inches?

Enter decimal feet (for example 6.5 for 6' 6"). Results show both decimal feet and feet-inches to the nearest 1/16".

What are common whole-number right triangles?

3-4-5, 5-12-13, 8-15-17, 7-24-25 and 20-21-29 are the Pythagorean triples builders use most. Any multiple of these also works.

Results are planning estimates. For structural work, confirm requirements with your local building authority and a qualified professional. See our disclaimer.

Ready to build? Get up to 3 free quotes from local pros.

Tell us about the project in about a minute. We pass it to up to three vetted local contractors who cover your area.

  • Free for homeowners, no obligation to hire
  • Your details go only to the pros matched to your job
  • Bring your calculator numbers — pros quote faster with real measurements

Start with your postal code

Takes about 60 seconds. No spam.