Foundation Squaring Calculator & Rectangle Layout Planner

Plan a rectangular foundation, form or pad before measuring the diagonals. Enter a target width and depth to find the planned diagonal and a 3–4–5 corner check that fits. For a measured footprint, enter four side lengths and two diagonals. One diagonal reconstructs the outline and the other checks it. A scaled overlay compares the estimated corners with the target rectangle using the fixed baseline and your entered tolerances.

Layout worksheet

Plan and check a rectangular foundation

Set the planned width and depth. Reconcile two measured diagonals and compare the four corners to your target.

Target rectangle

Use one unit for all dimensions and tolerances. Measure between the same points in a horizontal plane.

Along the A to B baseline.

Perpendicular to the baseline.

Measured sides and diagonals

Label the corners A, B, C and D in sequence. AC locates the corners. Measure BD separately to check the reconstruction.

Maximum allowed difference between measured and implied BD.

Maximum allowed distance from a corner to its target.

Corner D is 1.414213 units from its target, the largest offset.
Planned diagonal
13 units
12 × 5 units target
Largest corner offset
1.414213 units
Corner D · tolerance 0.03 units
Square layout plan view

A is fixed. The baseline points from A toward B. Positive y is on the left when looking from A toward B.

Foundation corners and baselineTarget 12 units wide and 5 units deep. Solid measured outline and dashed target share corner A. Arrows show estimated moves to each target.ABCD
Target rectangleMeasured outlineEstimated move toward target

Independent diagonal check

BD checks the outline reconstructed using four sides and diagonal AC.

Measured BD
11.7047 units
Implied BD
11.7047 units
Measured minus implied
-6.130e-8 units
Allowed diagonal gap
0.001 units
Tape and corner ledger

Estimated measured area 51.500002 units². Measured BD minus AC: -1.2953 units.

Measured corners, target shifts and opening angles
CornerMeasured xMeasured yShift xShift yMove distanceOpeningTolerance
A0 units0 units0 units0 units0 units75.963758°Within
B12 units0 units0 units0 units0 units90°Within
C12 units5 units0 units0 units0 units84.805573°Within
D1 unit4 units-1 unit+1 unit1.414213 units109.230669°Exceeds
Download foundation layout CSV
Show selectable CSV

How to use this calculator

  1. Choose Plan rectangle or Audit measured layout. Enter the intended width along A→B and intended depth perpendicular to the baseline.
  2. For planning, read the full diagonal and the two mark lengths for the 3–4–5 check at corner A. Use the same unit for all values.
  3. For an audit, label the four corners in sequence along the outline. Enter all four sides, diagonal AC and a separately measured diagonal BD in the same horizontal plane.
  4. Enter a tolerance for the independent BD comparison and a separate maximum allowed corner move. Review any tape discrepancy before using the reconstructed offsets.
  5. Compare the outlines and open the tape and corner ledger for signed changes along and across the baseline. Download the CSV to keep a copy.

The Formula

The mathematical logic powering this calculation is:

For a planned rectangle of width W and depth H, either diagonal is √(W² + H²). The corner check fits the largest scaled 3–4–5 triangle into the two sides that meet at A. The candidate scales are min(W/3, H/4) and min(W/4, H/3). Choose the greater scale and multiply each leg and the diagonal of the check by it.

For a measured footprint, corner A is the origin and A→B defines positive x. Positive y is to the left when looking from A toward B. Reconstruct triangles ABC and ADC using their shared AC diagonal and the four side distances. For a point with distances r and s to endpoints of base length L, its along-base coordinate is (L² + r² − s²)/(2L). Its perpendicular distance is twice the triangle area from Heron’s formula divided by L. B and D lie on opposite sides of AC in the model. Require their line to cross the interior of AC, so the outline is convex and the corners follow the entered order. Rotate the reconstructed outline into the baseline coordinate frame.

The BD tape check compares entered BD with reconstructed BD. If the absolute gap exceeds the entered diagonal tolerance, the layout audit shows the gap and withholds corner comparisons. Subtract each reconstructed corner from its target coordinates to obtain signed shifts. The straight-line difference is the magnitude of these two shifts and is compared with the entered corner tolerance. Tolerance comparisons include a numerical guard of 2×10⁻¹² times the relevant layout length scale. The guard absorbs arithmetic rounding and limits reporting of nearly unresolved geometries.

Use one linear unit in both plan and audit. Side lengths and plan spans support 0.01 to 10,000 and tolerances support 0 to 10,000, with up to six decimal places. This is a horizontal geometry check for a single convex footprint. It does not assess elevations, structural condition, design, survey accuracy or a specified construction tolerance.

Worked Example

If you input:

  • Target width × depth: 12 × 5 units
  • AB, BC, CD and DA: 12, 5, 11.045361 and 4.123106
  • AC and BD diagonals: 13 and 11.7047
  • Diagonal gap and corner tolerances: 0.001 and 0.03

Result:

The planned diagonal is 13 units. The independent BD check agrees within 0.001 units. Corner D differs by about 1.414213 units, approximately −1 along the baseline and +1 across it.

Frequently Asked Questions

How do I measure the sides and diagonals for a layout check?

Label corners A, B, C and D in order around the footprint. Use the same point at every corner and measure horizontal distances in a common unit. Enter AB, BC, CD, DA, AC and BD with those labels. Use BD as an independent reading.

Is a rectangle square as long as both diagonals match?

Equal diagonals are necessary for a rectangle, but can also occur in an isosceles trapezoid. The side measurements, corner positions and target dimensions help distinguish those cases.

Why can the second diagonal disagree with the reconstructed outline?

A different corner reference, mislabeled measurement, slope, tape sag or an inconsistent set of measurements can cause a discrepancy. Compare entered BD with the implied BD before relying on the coordinates.

What do positive and negative corner shifts mean?

Positive x moves in the A→B direction, and positive y moves left of that direction. Negative values move in the opposite direction. Corner A is fixed as the origin throughout the worksheet.

Does the corner tolerance represent a building code requirement?

It is the entered distance limit for this geometric comparison. Select it from your actual measurement purpose or project documents. This calculator does not assess the foundation or certify survey, construction or code compliance.

Similar Calculators