Geometry and layout calculator
Right Triangle Calculator
Solve missing sides and acute angles, then calculate the diagonal, area, perimeter, slope percent, and rise per 12. Right triangles are hiding in ramps, roofs, stairs, braces, frames, survey lines, and every rectangle you have ever tried to prove was actually rectangular.
Sage’s guided lesson
Give me two independent facts and the whole triangle has to confess
A right triangle has one fixed 90 degree angle. Once two suitable side or angle values are known, the remaining sides and acute angles are determined. The trick is identifying which side is opposite, which is adjacent, and which one is the hypotenuse before the calculator gets blamed for a labeling problem.

Name the sides before using the formulas
The hypotenuse is opposite the right angle
The two sides that meet at 90 degrees are called the legs. The side across from the right angle is the hypotenuse. It is always the longest side.
On this page, leg A is opposite angle A. Leg B is adjacent to angle A. This also makes leg A the rise and leg B the run when the triangle represents a slope.
The same triangle can represent a frame diagonal, brace, stair stringer, ramp, rafter, roof section, cable, survey offset, machine setup, or coordinate change. The geometry is identical even when the job has a different name for each side.
Put a small square at the 90 degree corner on your sketch. The side that does not touch that square is the hypotenuse.
Squares turn two legs into one diagonal
How to use the Pythagorean theorem
For a right triangle with legs a and b and hypotenuse c:
a² + b² = c²To find the hypotenuse, square both legs, add the results, and take the square root.
Three by four right triangle
c = √(3² + 4²)
c = √(9 + 16)
c = √25 = 5
To find a missing leg, subtract the known leg’s square from the hypotenuse’s square, then take the square root.
b = √(c² − a²)The subtraction only makes sense when the hypotenuse is longer than the known leg. If it is not, those measurements cannot describe the stated right triangle.

I know this is off topic, but this reminds me of a joke I heard when teaching this to one of my interns, What do you call a snail on a ship? A snail-or. Yeah, I don’t see the connection either, but I think it is cute!

Angles are encoded in side ratios
Sine, cosine, and tangent solve the rest
For angle A, the basic ratios are:
sin(A) = opposite ÷ hypotenuse = leg A ÷ c
cos(A) = adjacent ÷ hypotenuse = leg B ÷ c
tan(A) = opposite ÷ adjacent = leg A ÷ leg B
If the opposite leg and angle are known, divide the opposite leg by tangent to find the adjacent leg, or divide by sine to find the hypotenuse. If the adjacent leg and angle are known, multiply by tangent to find the opposite leg, or divide by cosine to find the hypotenuse.
The inverse functions find an angle from side ratios. For example:
A = arctan(opposite ÷ adjacent)The two acute angles always total 90 degrees, so once angle A is known, angle B is simply 90 degrees minus angle A.
SOH CAH TOA remembers the ratios. It cannot identify the opposite and adjacent sides until you choose the acute angle being discussed.
Degrees and percent describe the same tilt differently
Slope percent is rise divided by run, not the angle in degrees
When leg A is rise and leg B is run:
Slope percent = rise ÷ run × 100
Angle = arctan(rise ÷ run)
A 100 percent slope has equal rise and run. Its angle is 45 degrees, not 100 degrees. A slope can exceed 100 percent whenever the rise is greater than the run, while an acute right triangle angle remains below 90 degrees.
Roofing often expresses pitch as inches of rise for 12 inches of run. A rise of 6 for a run of 12 is a 6 in 12 pitch, a 50 percent slope, and an angle of about 26.565 degrees.
They describe rise divided by horizontal run. They do not describe the sloped surface length.


Some whole numbers fit perfectly
Pythagorean triples make fast square checks
A Pythagorean triple is a set of whole numbers that satisfies a² + b² = c². Familiar examples include 3, 4, 5 and 5, 12, 13.
Any common multiple keeps the same shape. A 6, 8, 10 triangle and a 9, 12, 15 triangle are both scaled versions of 3, 4, 5.
To check a corner, mark one leg at 3 units, the other at 4 units, and adjust the corner until the distance between those marks is 5 units. Larger multiples usually reduce the effect of a small marking error.
There are infinitely many integer triples. One classical way to generate them uses two whole numbers m and n:
a = m² − n²
b = 2mn
c = m² + n²
Choose m = 2 and n = 1, and the result is 3, 4, 5.
If the square of the longest measured side equals the sum of the squares of the other two, the angle opposite the longest side is a right angle, within the accuracy of the measurements.
The relationship is older than its familiar name
Ancient surveyors used right triangle relationships long before modern calculators
Old Babylonian mathematical tablets show knowledge of exact integer side relationships now called Pythagorean triples. The tablet known as Si.427 records an applied surveying problem in which diagonal triples were used to create perpendicular field boundaries.
Ancient Indian and Chinese mathematical traditions also described the right triangle relationship. Greek geometry later supplied enduring deductive proofs, and the theorem became associated with Pythagoras and the Pythagorean school.
The popular image of Egyptian rope stretchers forming a 3, 4, 5 triangle with a knotted rope is a memorable teaching story. It may describe a workable method, but the direct historical evidence for that exact tidy scene is less certain than the story often suggests.
A lesser known consequence appears in the simplest square. A square with side length 1 has diagonal √2. That number is irrational, so no ordinary fraction represents the diagonal exactly. Even the most familiar right triangle can lead straight into deep mathematics.
The area of the square built on the hypotenuse equals the combined areas of the squares built on the two legs. The length formula is the square root version of that area relationship.


A correct formula still needs a true triangle
Practical layout errors and checks
- Confirm which side is opposite the right angle; that is the hypotenuse.
- Measure horizontal run horizontally, not along the sloped surface.
- Use the same units for every side.
- Keep full precision through square roots and trigonometry, then round the final layout value.
- Check both diagonals when squaring a rectangular frame.
- Remember that equal diagonals do not guarantee straight or untwisted material.
- Use a longer 3, 4, 5 multiple when the available space permits.
- Test compound assemblies before cutting finished stock.
A one degree error over a short bracket may be invisible. Over a long wall, rafter, or survey line, it becomes a noticeable displacement. Geometry scales the error along with the project.
For safety critical stairs, ramps, roofs, rigging, structures, or machinery, use the appropriate code, manufacturer data, engineering requirements, and site measurements. This calculator solves ideal geometry; it does not approve the assembly.
Square the calculated legs and add them. The sum should match the square of the hypotenuse within rounding. Then compare the calculated geometry with the actual physical diagonal.
The corner has been questioned thoroughly
The sides satisfy the theorem, the acute angles total 90 degrees, and the diagonal has stopped pretending it is mysterious.
You now know how to solve missing sides, use trigonometric ratios, compare slope percent with angle, and check square with whole number triples.
That earns cheese fries. I arranged three on one side, four on the other, and five across the diagonal. It is structurally unnecessary and deeply satisfying.
Quick answers
Right triangle questions
What is the formula for the hypotenuse?
Square both legs, add the squares, then take the square root: c = √(a² + b²).
Can the hypotenuse be shorter than a leg?
No. It is opposite the right angle and is always the longest side.
What is a 3, 4, 5 triangle used for?
It establishes or checks a 90 degree corner. Any common multiple, such as 6, 8, 10, keeps the same right triangle shape.
Is a 100 percent slope a 100 degree angle?
No. A 100 percent slope has equal rise and run, so its angle is 45 degrees.
Do the two acute angles always add to 90 degrees?
Yes. All triangle angles total 180 degrees and the right angle already uses 90 degrees.
Can the Pythagorean theorem check whether a corner is square?
Yes. If the longest side squared equals the sum of the other two sides squared, the opposite angle is 90 degrees within measurement accuracy.
Why does a small angle error matter over a long distance?
The position error grows with the run, so a tiny angular error can become a large offset on a long layout.