# Squaring Calculator for Layout and Setting Out (3-4-5 Rule)

> Check a building layout is square: the diagonal it should read, the largest 3-4-5 triangle to strike, and how far and which way to move a corner.

Page: https://craftquantities.com/calculators/measurements-conversions/layout-squaring-calculator/ (calculator). This is the page's Markdown copy; the HTML page is the canonical version.

Version 1.0.0, sources checked 2026-10-05, 3 published test vectors.

Diagonal when square: 30.8 ft for Side Along the Base Line 26 ft, Side to the Far Corner 16.5 ft and Diagonal You Measured 31 ft, the page's opening figures; on the metric page, 8 m, 5 m and 9.45 m give 9.43 m. Source: Euclid, Elements, Book I, Proposition 48 (D. E. Joyce's edition, Clark University).

## Inputs

A length, area or volume is entered with its unit. The page opens on the values below: a metric reader sees the metric column, a US customary reader the other.

| Input | id | Opens at (metric) | Opens at (US customary) | Accepts |
|---|---|---|---|---|
| Side Along the Base Line | `baseSide` | 8 m | 26 ft | mm, cm, m, in, ft, yd; range 0.5–300 m |
| Side to the Far Corner | `otherSide` | 5 m | 16.5 ft | mm, cm, m, in, ft, yd; range 0.5–300 m |
| How You Are Checking | `checkBy` | One diagonal, across the corner | One diagonal, across the corner | `one`, `two` |
| Diagonal You Measured | `measuredDiagonal` | 9.45 m | 31 ft | mm, cm, m, in, ft, yd; range 0.5–450 m |
| Difference Between the Two Diagonals | `diagonalDifference` | 17 mm | 0.67 in | mm, cm, m, in, ft, yd; range 0–1 m |

- **Side Along the Base Line**: The side you hold fixed, measured from the corner: usually the longer side, or the one set off an existing wall.
- **Side to the Far Corner**: The second side, running from the same corner and meant to be square to the base line.
- **How You Are Checking**: A single diagonal across one corner, or the two diagonals of a four-cornered layout.
- **Diagonal You Measured**: The tape reading from the end of the base side straight across to the end of the other side.
- **Difference Between the Two Diagonals**: How much longer one corner-to-corner reading is than the other.

`measuredDiagonal` applies only when `checkBy` is `one`.
`diagonalDifference` applies only when `checkBy` is `two`.

## The answer on the opening values

Worked exactly as the page works it, on the values each system opens on.

### Metric

| Result | Value |
|---|---|
| **Diagonal when square** | 9.43 m |
| Squaring triangle: leg along the longer side | 6 m |
| Squaring triangle: leg along the shorter side | 4.5 m |
| Squaring triangle: diagonal between the two marks | 7.5 m |
| Measured diagonal less the square figure | 16.02 mm |
| Angle at the corner | 90.22 ° |
| Corner out of square by | 0.22 ° |
| Move the far end of the second side by | 18.91 mm |

### US customary

| Result | Value |
|---|---|
| **Diagonal when square** | 30.8 ft |
| Squaring triangle: leg along the longer side | 20 ft |
| Squaring triangle: leg along the shorter side | 15 ft |
| Squaring triangle: diagonal between the two marks | 25 ft |
| Measured diagonal less the square figure | 2.48 in |
| Angle at the corner | 90.85 ° |
| Corner out of square by | 0.85 ° |
| Move the far end of the second side by | 2.94 in |

## How it is worked out

The diagonal reads longer than the square figure, so the corner is open — more than 90° — and the far end of the second side has to swing towards the far end of the base line by the distance in the last row. Swing it on the tape from the corner so the side keeps its length, then read the diagonal again; two or three rounds of swinging and re-reading usually settle it.

The working the page shows, in order: Squaring triangle: leg along the longer side; Squaring triangle: leg along the shorter side; Squaring triangle: diagonal between the two marks; Measured diagonal less the square figure; Angle at the corner; Corner out of square by; Move the far end of the second side by; then diagonal when square.

The method, derived in full:

- [Nominal Sizes, Land Measure and Setting Out](https://craftquantities.com/methodology/nominal-sizes-and-measurement-conventions/): Why a two-by-four is one and a half by three and a half, why a board foot is a volume the board does not contain, and why checking the diagonals finds an error that measuring the sides cannot.

The equations it runs, in the open formula library:

- Formula: [d = √(a² + b²)](https://craftquantities.com/formulas/roof-pitch-and-slope/#diagonal-of-a-rectangle)

What this calculation does not cover:

- Every figure here is a horizontal distance. A tape laid on sloping ground reads the slope, which is longer than the plan distance, so on a falling site take the sides and the diagonals in level steps or along a level line; otherwise the diagonal disagrees with the square figure on a corner that is in fact square.
- Take every reading with the same tape, at the same pull and from the same marks — the centre of the pin or the nail in the profile, not the edge of a peg. Two tapes, or one tape pulled differently, can disagree by more than the error being looked for.
- The single-diagonal check assumes the two side lengths were measured from the same corner point to the same two marks the diagonal runs between. If the sides are not the lengths entered, the corner angle and the offset describe a different corner.
- Equal diagonals prove a rectangle only together with equal opposite sides, and the two-diagonal shift assumes that the opposite sides are equal — that the shape has racked as a parallelogram rather than been pegged at four independent wrong lengths.
- The 3-4-5 triangle shown is the largest that fits on the two sides from the corner. A bigger one is better still: if the lines can be pegged long past the corners, scale the triangle up beyond the building and mark the legs on the lines themselves, never in the air.
- No tolerance is applied. How far out a corner may be is set by the job's specification or the tolerance standard it follows; the page reports the error and leaves the judgement to that.

## Sources

As the calculator cites them (sources checked 2026-10-05):

- Euclid, Elements, Book I, Proposition 48 (D. E. Joyce's edition, Clark University): if the square on one side of a triangle equals the squares on the other two together, the angle between those two is right — which is why any multiple of 3, 4 and 5 makes a square corner — and Proposition 47, its converse, which gives the expected diagonal √(a² + b²) <https://mathcs.clarku.edu/~djoyce/elements/bookI/propI48.html>
- The QUIKRETE Companies, Layout Basics for Slabs and Footers: stake out with the 3-4-5 triangular method, any multiple such as 6-8-10 or 9-12-15 giving the same result, then double-check for squareness by measuring the diagonals between opposite corners, which should be equal; batter boards set back from the work keep the lines <https://www.quikrete.com/PDFs/Projects/LayoutBasicsForSlabsAndFooters.pdf>
- NIST Digital Library of Mathematical Functions, §4.42 Solution of Triangles, the law of cosines (4.42.5): the corner angle from its two sides and the diagonal across it, and, applied to the two halves of a parallelogram, d₁² + d₂² = 2(a² + b²) and d₁² − d₂² = 4ab·cos θ, from which the racked shift and angle follow <https://dlmf.nist.gov/4.42>

A code or standard has force only where a jurisdiction has adopted it, usually with local amendments; check what is in force with the authority where you build.

## Questions answered on the page

**Why does a 3-4-5 triangle make a right angle?**

Because 3 squared plus 4 squared is 5 squared, and a triangle whose sides keep that relationship has a right angle between the two shorter sides — Euclid proved it, and setting-out crews use it to this day. It holds for any multiple, in any unit: 6-8-10, 9-12-15, 1.5-2-2.5. Measure the short leg along one line and the long leg along the other from the corner, and move the second line until the distance between the two marks is the third number.

**How big should the squaring triangle be?**

As big as the job will hold. Every mark has a small error, and a bigger triangle turns the same error into a smaller angle, which then grows less by the time the line reaches the far corner. A triangle struck at three, four and five units on a long building is a poor guide to its far end; one scaled up to most of the shorter side is a good one, and one struck past the corners on lines pegged long is better still. The page gives the largest whole multiple that fits on the two sides themselves.

**My diagonal reads long. Which way do I move the corner?**

Towards the far end of the base line. A diagonal longer than the square figure means the corner has opened past 90°, so the far end of the second side is leaning away; swing it back on the tape from the corner — keeping that side's length — by the distance the page gives, and read again. A short diagonal means the corner has closed, and the end swings the other way.

**Are equal diagonals enough to prove a rectangle is square?**

Only with equal opposite sides. A parallelogram — a racked rectangle — has unequal diagonals, which is what the check catches. But a trapezium with two equal slanted sides also has equal diagonals while being no rectangle at all, so a layout with its four pegs at independently wrong lengths can pass a diagonal check. Read the four sides as well, then the diagonals.

**Why is the difference between the diagonals bigger than the error at the corner?**

Racking pulls the two readings apart from both ends at once. Slide the far side along the base and the diagonal running towards the slide grows by nearly as much as the other one loses, so the gap between the two tapes is roughly double the slide, trimmed by the ratio of the base to the diagonal. An 8 by 5 m (26 by 16.5 ft) base slid 10 mm (0.39 in) reads about 17 mm (0.67 in) apart corner to corner — a sharper test than any single side could give.

**Should I use this page or the court diagonal page?**

Use this page for a building layout — a slab, a foundation, a deck or a frame — checked from the diagonals you measure, and the Court Diagonal and Squaring Triangle Calculator for a sports court set out to its governing body's dimensions.

## Related calculators

- [Court Diagonal and Squaring Triangle Calculator](https://craftquantities.com/calculators/measurements-conversions/rectangle-diagonal-squaring-calculator/)
- [Triangle Calculator — Right Triangle and Any Triangle Solver](https://craftquantities.com/calculators/measurements-conversions/triangle-calculator/)
- [Arc Chord and Mid-Ordinate Check Calculator](https://craftquantities.com/calculators/measurements-conversions/arc-chord-offset-calculator/)
- [Square Footage Calculator](https://craftquantities.com/calculators/measurements-conversions/square-footage-calculator/)

## Run it from a program

- REST: `GET https://api.craftquantities.com/v1/calculate/layout-squaring-calculator` with each input as a query parameter, a length, area or volume with its unit; `https://api.craftquantities.com/v1/describe/layout-squaring-calculator` lists the inputs.
- MCP: the `calculate` tool at https://api.craftquantities.com/mcp with `slug` `layout-squaring-calculator`.
- Definition and test vectors: https://craftquantities.com/api/v1/calculators/layout-squaring-calculator.json

---
Source: https://craftquantities.com/calculators/measurements-conversions/layout-squaring-calculator/
Craft Quantities: free to read, cite and link to; the pages are not licensed for republication. Quantities only: no prices, no design and no certification.
