Right-Angle (3-4-5) Calculator
Square up corners and solve right triangles. Enter two legs to get the exact diagonal and corner angle, then optionally enter your measured diagonal — the calculator tells you whether the corner is a true 90° within 1/8", and which way it’s off. It’s the classic 3-4-5 method with the math done at any size. Free, no login.
Legs
Result
Enter both legs to calculate
How this calculator works
This is the Pythagorean theorem — pure geometry, no code table, roughly 2,500 years old and not up for debate. For a corner with legs a and b:
diagonal = √(a² + b²) · angle = atan(a ÷ b)
The field trick is that 3² + 4² = 5² exactly — so marking 3 ft down one line and 4 ft down the other and pulling the tape to a 5 ft diagonal proves the corner is 90°. Any multiple works (6-8-10, 9-12-15…), and bigger is better: the same tape error matters half as much at double the scale. The square-check compares your measured diagonal against the computed one and calls it square within 1/8" (0.0104 ft) — a practical framing tolerance, not a standard. Diagonal too long means the corner is open (more than 90°); too short means it’s pinched. For a full rectangle, equal cross-corner diagonals are the final proof.
Worked example
Squaring a 12 × 16 ft deck frame off the house — a 3-4-5 scaled ×4:
- Diagonal: √(12² + 16²) = √400 = 20.000 ft exactly.
- Corner angle opposite the 12 ft leg: atan(12 ÷ 16) = 36.87° — the same angle every 3-4-5 has, at any scale.
- Square check: your tape reads 20'-0-5/8" (20.05 ft). That is 0.05 ft ≈ 5/8" long — outside the 1/8" tolerance, so the corner is open. Rack the frame to close the diagonal and re-pull.
Enter the same frame above (legs 12 and 16, measured diagonal 20.05) to reproduce it.
Reference: 3-4-5 multiples
Handy exact triples for layout at different scales — diagonals computed by the same engine as the calculator. Use the largest one that fits your slab or frame.
| Leg A | Leg B | Diagonal |
|---|---|---|
| 3 ft | 4 ft | 5 ft |
| 6 ft | 8 ft | 10 ft |
| 9 ft | 12 ft | 15 ft |
| 12 ft | 16 ft | 20 ft |
| 15 ft | 20 ft | 25 ft |
| 18 ft | 24 ft | 30 ft |
| 24 ft | 32 ft | 40 ft |
| 30 ft | 40 ft | 50 ft |
Frequently asked questions
How does the 3-4-5 method work for squaring corners?
It is the Pythagorean theorem in easy numbers: 3² + 4² = 5², so a triangle with 3 ft and 4 ft legs and a 5 ft diagonal contains an exact 90° corner. Measure 3 ft down one line and 4 ft down the other, then adjust until the diagonal between the marks tapes at exactly 5 ft. Any multiple works the same — 6-8-10 or 9-12-15 — and a bigger triangle makes small errors easier to see.
How do I check a layout for square with this calculator?
Enter the two legs you actually measured — they do not need to be 3 and 4; any two distances along the lines work — and the calculator returns the exact diagonal a true 90° corner requires. Then pull the real diagonal with your tape and enter it in the measured-diagonal field: the tool tells you whether the corner is square and, if not, by how many inches.
How close does the diagonal need to be to call it square?
This tool reads a corner as square when the measured diagonal is within 1/8 inch of the computed one — a reasonable working tolerance for framing-scale layout. Finish work, cabinetry, and tile may warrant holding tighter, and long foundation diagonals accumulate error, so re-check with the longest legs you can. If you are out, the readout shows the miss in inches so you know how far to rack the layout.
How do I square a foundation or deck using diagonals?
For a rectangle, the two corner-to-corner diagonals are equal only when all four corners are 90° — so lay out the sides to length, then compare diagonals and rack the frame until they match. This calculator gives you the target: enter the length and width as the legs, and the reported diagonal is what both tapes must read.
How do I enter feet and inches?
The inputs take decimal feet, so convert inches by dividing by 12: 6 in is 0.5 ft, so 12 ft 6 in is entered as 12.5. For odd inches, 1 in ≈ 0.0833 ft — 9 ft 3 in is 9.25, and 10 ft 4 in is about 10.333. Results come back in decimal feet the same way; multiply the fraction by 12 to get back to inches.
Method: Pythagorean theorem, diagonal = √(a² + b²), with the angle from its inverse tangent. This is exact mathematics with no code citation; the only judgment call is the 1/8" square tolerance, which is a common framing practice — tighten it for cabinetry and finish work, where 1/16" or less is the norm. Tape sag, plate bow, and reading the wrong edge of the mark all show up in the diagonal, so pull tight, measure to the same corners top or bottom, and confirm big layouts with both cross diagonals rather than one.
Pair with the Rafter & Roof Pitch Calculator — a rafter is this same triangle stood upright — the Stair Calculator for riser-and-tread layout, or the Roof Pitch Multiplier to convert pitch to angle and slope factor.