Diagonal & Squareness Calculator
Find the diagonal of a rectangle to check that a foundation or frame is square, and get the 3-4-5 layout marks.
How it's calculated
Diagonal = √(A² + B²). For layout, a 3-4-5 triangle has a right angle, so if one leg is A, the other is A × 4 ÷ 3 and the diagonal between their ends is A × 5 ÷ 3.
Each measurement has its own unit menu, so you can enter whatever your plans use. Results are shown in several units at once.
Worked example
With side a 3 m, side b 4 m, the calculator gives: diagonal (should match when square) 5 m; 3-4-5 layout: second leg 4 m; 3-4-5 layout: hypotenuse 5 m.
Good to know
To check a rectangle, measure both diagonals. If they are equal and match the calculated value, the corners are square.
Frequently asked
How do I square a corner with 3-4-5?
Mark 3 units along one line and 4 along the other from the corner. The corner is square when the distance between the marks is exactly 5 units.
Which size triangle is best?
The larger the triangle, the more accurate it is. Use multiples such as 6-8-10 or 9-12-15.