Squaring Calculator

Find the exact diagonal of a rectangle to check that a foundation, deck or slab is square, and see how far out of square your measurements are.

Result

Exact diagonal—ft
Diagonal in feet and inches—
Diagonal 1 off by—
Diagonal 2 off by—
Difference between diagonals—
Result—

Before you pour a footing, frame a deck or lay out a patio, you want the corners to be exactly square. A framing square is too small, and corners estimated by eye drift, especially over 20 or 30 feet. The reliable method is to measure diagonals. This squaring calculator tells you the exact diagonal for any rectangle and, if you enter your measured diagonals, how far out of square the layout is.

How to use the squaring calculator

  1. Enter the two sides of the rectangle, A and B, along the lines you have laid out.
  2. Read the exact diagonal, in decimal feet and in feet and inches.
  3. Measure both diagonals on your site, enter them, and read the error in inches for each.
  4. Adjust the layout by shifting a corner stake until both diagonals match the calculated length.

Squaring formula

A = 3 ft B=4 ft Diagonal = 5 ft Diagonal = √(A²+B²) 3² + 4² = 5² Equal diagonals = square
/text> calcmaple.com
If the diagonal of a 3 and 4 foot triangle measures 5 feet, the corner is a true right angle.
Diagonal = √(A²+B²)
3-4-5 rule: 3² + 4² = 5² (any multiple works)

This is the Pythagorean theorem. A rectangle has two equal diagonals; a four-sided figure with unequal diagonals is skewed, and the longer diagonal points to the pair of corners that are too wide (more than 90°).

Worked example: a 12 × 16 ft deck

  1. Square the sides: 12² = 144 and 16² = 256, total 400.
  2. Diagonal: √400 = 20 ft exactly (a 3-4-5 triangle times 4).
  3. Measure both diagonals. If one is 20 ft 0 in and the other is 20 ft 1 in, the layout is out of square; shift a corner until the long one shrinks by half the difference and the short one grows by half.

For a 20 × 30 ft slab the diagonal is √1300 = 36.056 ft, or about 36 ft 0.7 in.

Diagonals of common rectangles

RectangleDiagonal (ft)Diagonal (ft and in)
3 × 4 ft5.0005 ft 0.00 in
6 × 8 ft10.00010 ft 0.00 in
9 × 12 ft15.00015 ft 0.00 in
12 × 16 ft20.00020 ft 0.00 in
15 × 20 ft25.00025 ft 0.00 in
18 × 24 ft30.00030 ft 0.00 in
24 × 32 ft40.00040 ft 0.00 in
30 × 40 ft50.00050 ft 0.00 in

Laying out a square corner

  • Use the largest triangle you can. A 3-4-5 triangle at 9-12-15 or 12-16-20 is more accurate than a small one, because a given error in a measurement is a smaller angle on a long leg.
  • Pull the tape tight. Hold it level, and support it, as sag adds length. Use a helper or a hook.
  • Mark and adjust. Drive stakes or batter boards and move the strings, not the stakes, until both diagonals match.
  • Re-check after the forms. Concrete forms and framing can move when fastened, so re-measure the diagonals.

Beyond rectangles

The same approach works to test a room before laying tile or flooring and to check a door or window opening, a frame or a gate. For a hip or trapezoid you can break the shape into rectangles and triangles. If the diagonals are equal but the sides are not, the shape is not a rectangle.

Use the layout with the Deck Calculator, the Concrete Footing Calculator or the Rafter Length Calculator. To get the area of the rectangle, try the Square Footage Calculator, and for railings between posts the Baluster Calculator.

Frequently asked questions

What is the 3-4-5 rule?

If one side of a triangle is 3 units, another is 4 units and the diagonal between their ends is 5 units, the corner between the 3 and 4 sides is exactly 90°. Multiples such as 6-8-10, 9-12-15 and 12-16-20 work too; bigger multiples are more accurate.

How do I check that a foundation is square?

Measure the two diagonals from corner to corner. In a rectangle they are equal. If they differ, move a corner (or pull the layout) until they match, while keeping the side lengths correct.

How is the exact diagonal calculated?

By the Pythagorean theorem: diagonal = √(A² + B²). A 12 by 16 ft rectangle has a diagonal of √(144 + 256) = 20 ft.

How much error is acceptable?

It depends on the job. Foundation and framing crews usually aim for 1/4 inch or better on diagonals of 30–40 feet, but check your plans and tolerances. Even a half inch of out-of-square shows up at the roof and siding.

Do equal diagonals prove it is square?

Equal diagonals prove a four-sided shape with opposite sides equal is a rectangle. If you did not check the opposite sides as well, a shape could be a rhombus or an isosceles trapezoid with equal diagonals. Measure all four sides and both diagonals.

Related calculators

Last updated October 25, 2026. Found a problem with this calculator? Tell us.