Skip to Main Content
Carpentry Planning Tools•Free Web App

Builder's Square Calculator (3-4-5 & Diagonal)

To square a rectangle, both diagonals must equal √(length² + width²). A 20 × 30 ft foundation is square when each diagonal measures 36 ft 0-11/16 in. To set the first corner, use the largest 3-4-5 triangle that fits: here 18 ft along the short side, 24 ft along the long side and 30 ft across.

Formulas and figures reviewed · How we check our calculators

Every deck, shed, slab and foundation starts with square corners. This calculator gives the exact diagonal to the nearest 1/16 in., the biggest 3-4-5 triangle you can lay out along your sides, and tells you how far off a corner is from the diagonals you measured.

1 · Project Specifications

Rectangle

30

Decimal feet: 6 in. = 0.5 ft, 3 in. = 0.25 ft, 1 in. ≈ 0.083 ft.

20

Check Your Layout

0

Same unit as the sides. Enter 0 to skip the squareness check.

0

The other corner-to-corner measurement. Equal diagonals mean the rectangle is square.

2 · Material Estimates

Example result for the default values. Enter your own measurements and press Calculate.

Estimation Results

Diagonal When Square
36 ft 0-11/16 in

Corner to corner. Both diagonals must equal this.

Largest 3-4-5 Layout
Mark 18 ft along the short side and 24 ft along the long side; the diagonal between the marks must be 30 ft.
3-4-5 Multiple
18-24-30 ft
Squareness Check
Enter a measured diagonal to check your corners.
Diagonal (metric)
10.990 m

✓ Recommendations

Lay out the long side first, square one corner with 3-4-5, measure the other sides, then confirm both diagonals match.

Notes

Measure from the same point on each corner (e.g., the outside of the batter-board string or the outside face of the form).

Estimates include recommended safety waste margins. Double-check measurements before purchasing materials.

Detailed Project Guide & Calculation Methodology

Calculation Formulas & Methodology

Diagonal of a square-cornered rectangle

Diagonal = √(Length² + Width²)

The Pythagorean theorem. When both diagonals equal this length, all four corners are 90°.

Step-by-step

  1. 130 × 20 ft: √(900 + 400) = √1,300 = 36.056 ft
  2. 20.056 ft × 12 = 0.67 in. → 36 ft 0-11/16 in

3-4-5 method

Mark 3k on one side, 4k on the other; the diagonal is 5k

Any multiple works: 3-4-5, 6-8-10, 9-12-15 ft or 0.6-0.8-1.0, 1.2-1.6-2.0 m. Use the largest that fits: errors shrink as the triangle grows.

Corner angle from a measured diagonal

Angle = arccos((L² + W² − D²) ÷ (2 × L × W))

The law of cosines. A diagonal longer than the target means the corner is more than 90°.

How It Works

  1. 1Enter the length and width of the rectangle.
  2. 2Press Calculate to get the target diagonal and the 3-4-5 layout.
  3. 3After setting out, measure both diagonals and enter them to check how far out of square the corners are.

Diagonals for common layouts

Target diagonals for square-cornered rectangles, to the nearest 1/16 in. Both diagonals should read this length.

SizeDiagonal (ft-in)Diagonal (m)Typical project
8 × 10 ft12 ft 9-11/16 in3.903 mSmall shed
10 × 12 ft15 ft 7-7/16 in4.761 mShed, deck
12 × 16 ft20 ft 0 in6.096 mShed, deck (3-4-5 multiple)
16 × 20 ft25 ft 7-3/8 in7.807 mDeck, patio
20 × 20 ft28 ft 3-7/16 in8.621 mTwo-car garage slab
24 × 24 ft33 ft 11-5/16 in10.345 mGarage
20 × 30 ft36 ft 0-11/16 in10.990 mFoundation
30 × 40 ft50 ft 0 in15.240 mShop (3-4-5 multiple)

3-4-5 multiples

MultipleFeetMeters
× 13 – 4 – 50.3 – 0.4 – 0.5
× 26 – 8 – 100.6 – 0.8 – 1.0
× 39 – 12 – 150.9 – 1.2 – 1.5
× 412 – 16 – 201.2 – 1.6 – 2.0
× 515 – 20 – 251.5 – 2.0 – 2.5
× 618 – 24 – 301.8 – 2.4 – 3.0
× 1030 – 40 – 503 – 4 – 5

Use the largest multiple your sides allow; a 1/8 in. error over 5 ft is a bigger angle error than over 30 ft.

How to square a layout with string lines

  • •Set batter boards a few feet outside each corner and pull a string for the first (long) side.
  • •Mark the corner on the string, then measure 4k along it and mark.
  • •Pull the second string roughly square, mark 3k from the corner, and swing it until the marks are exactly 5k apart.
  • •Measure the other two sides to length and set the last corner.
  • •Measure both diagonals; adjust the last corner until they match the target from this calculator.

Frequently Asked Questions

✓ Pro Tips

  • •Hook the tape on a nail or have a helper hold it; a hand-held end creeps.
  • •Mark string positions on the batter boards so you can re-pull them after digging.
  • •Recheck diagonals after setting forms; bracing and stakes can push them out.

⚠ Common Mistakes

  • •Using a small 3-4-5 triangle on a big layout, which magnifies small errors.
  • •Measuring diagonals to different points (inside vs outside of a form).
  • •Checking only one diagonal: a parallelogram can have the right sides but no square corners.

Share Your Estimate

DIY Estimation Checklist

  • •Measure lengths and heights twice for accuracy.
  • •Check product labels for actual coverage rates.
  • •Order materials with a 10% buffer for cuts and waste.
  • •Account for doors, windows, and obstacles.
  • •Compare quotes from at least two suppliers.