Layout and Carpentry Math

Checking for Square: 3-4-5 and Diagonals

The Pythagorean theorem from a Babylonian tablet to a deck corner: why 3-4-5 works and how to scale it to 6-8-10, 9-12-15, 12-16-20, and 15-20-25 ft; squaring foundation and deck layouts with strings and two tapes; what a difference between diagonals means, worked for a 1/2-in difference on a 12-by-16-ft frame; racking walls, decks, cabinets, and drawers square; and how 1 degree grows to 4 3/16 in over 20 ft.

  • 11 min
  • 9 steps
  • 8 questions
  • 7 hands-on
  • Lesson 4 of 25 in Layout and Carpentry Math

In this lesson

  1. A tablet’s worth of geometry
  2. Scaling the triangle
  3. Squaring a foundation or a deck
  4. What the difference means
  5. Racking it square
  6. Small angles over long runs
  7. Tablets and manuals to look at
  8. Square a corner on the lawn

A corner is square when the three sides of a triangle drawn on it fit a² + b² = c². Carpenters check it two ways: with a triangle of known sides, usually 3-4-5 or a multiple, or by measuring a rectangle’s diagonals. Both are tape-measure geometry, and both get more accurate as they get bigger.

A tablet’s worth of geometry

A clay tablet in the British Museum sets a problem in a few lines: “4 is the length and 5 the diagonal. What is the breadth?” It answers by squaring: 4 times 4 is 16, 5 times 5 is 25, 16 from 25 leaves 9, and 3 times 3 is 9 1. Yale’s tablet YBC 7289, from the Old Babylonian period of 1900 to 1600 BC, is a square of side 30 with its diagonals drawn and the diagonal written as 42;25,35 in base 60: 30 times a square root of 2 that is off by less than a millionth 1. The theorem carries Pythagoras’s name, but the Babylonians knew it about a thousand years before him; he may have been the first to prove it, and to him it was about actual squares built on the sides, not numbers 2.

Top: a right triangle with legs 3 and 4 and hypotenuse 5, a square of unit tiles on each side, 9 green on the short leg, 16 blue on the long leg, and 25 red on the hypotenuse, beside a table of scaled triangles: 3-4-5, 6-8-10, 9-12-15, 12-16-20, and 15-20-25 feet. Bottom: a 12-by-16-foot deck corner laid out with strings over batter boards, marks at 12 feet and 16 feet from the corner, and a dashed diagonal that must read 20 feet.
Nine and sixteen make twenty-five, and the triangle scales to any size. A 12-by-16 deck has a 20-ft diagonal: 3-4-5 four times over. Credit: StudyCorner original diagram after FM 5-426, Carpentry, and MacTutor · CC BY 4.0 · Source

That is still the best way to see 3-4-5. Build squares on the sides: 9 tiles on the 3, 16 on the 4, and they exactly fill the 25 on the 5. Any triangle whose sides fit that rule has a right angle between the two short sides, and 3-4-5 is the smallest in whole numbers.

Scaling the triangle

Multiply all three sides by the same number and the angle stays 90 degrees:

Multiple Feet Metric
x 2 6 - 8 - 10 1.2 - 1.6 - 2.0 m
x 3 9 - 12 - 15 1.8 - 2.4 - 3.0 m
x 4 12 - 16 - 20 2.4 - 3.2 - 4.0 m
x 5 15 - 20 - 25 3.0 - 4.0 - 5.0 m

The Army’s carpentry manual squares building lines with 6-8-10, uses multiples such as 12-16-20 for a layout 50 by 100 feet, and says never to start with less than 6 feet 3. The reason is the error growth worked at the end of this lesson: the same slip of the tape matters five times less on a triangle five times bigger. Use the biggest triangle the site allows.

Find the mistake

Two things in this account of scaling the triangle are wrong.

This exercise needs JavaScript.

Squaring a foundation or a deck

Looking straight down at the corner of a foundation layout on sandy ground: two pale lumber batter boards meet in an L at the bottom left, two white strings cross in the open ground beyond them, a wooden stake stands near the crossing, and a pair of black boots stands between the boards.
Strings from batter boards cross over the corner of a 16-by-16-ft storage barn's foundation in North Carolina. The crossing is the corner; the boards stay put while the hole is dug. Credit: Edward27821, via Wikimedia Commons · CC BY-SA 4.0 · Source

Lines for a foundation or a deck are strings stretched between batter boards set a few feet outside the corners, where digging won’t disturb them 3. With the strings up, measure 6 feet along one from the corner and 8 along the other and move the strings until the diagonal between the marks is 10 3. For a 12-by-16-ft deck off a house, fix the string along the house first, since the house won’t move, square the second string off it with 12 and 16 and a 20-ft diagonal, and then lay out the rest.

Without strings, two tapes do it. The Navy’s Builder manual locates a building corner 35 feet out from a base line: the triangle with legs 35 and 40 has a hypotenuse of about 53.1 feet, so with points 40 feet apart on the base line, one person holds the 53.1-foot mark of a tape on the far point, another the 35-foot mark of a second tape on the near one, and a third walks the joined zero ends out until both come taut, right over the corner; or use 30, 40, and 50, which is 3-4-5 ten times over 4. Worked out, the square root of 35² + 40² is 53.15 feet, 53 ft 1 13/16 in.

Footings, frost depth, and the code are in Footings and Frost Depth; deck framing in Deck Framing and the Ledger.

Work it out

A rectangle measures 35 by 40 ft. What should each diagonal read, in feet, to two decimals?

This exercise needs JavaScript.

Put in order

Put the steps for squaring a 12-by-16-ft deck layout with strings in order.

This exercise needs JavaScript.

What the difference means

A 16-by-12-foot frame drawn racked into a parallelogram, its lean exaggerated 40 times, with one diagonal labeled 240 1/4 inches and the other 239 3/4, and an arrow showing the corner at the end of the long diagonal to be pushed back 5/16 inch. A box works the numbers: the square frame's diagonal is 240 inches; the difference between diagonals is 230.4 times the sine of the error angle; a 1/2-inch difference means 0.124 degree and a top slid 5/16 inch; half the difference, 1/4 inch, is close but not exact; check opposite sides before trusting diagonals.
What a half-inch difference between diagonals means on a 12-by-16 frame, and how far to move it. Credit: StudyCorner original diagram · CC BY 4.0 · Source

Once all four corners are set, measure both diagonals. In a rectangle they are equal only when the corners are square; if they aren’t, move the lines until they are 3. The Navy squares a framed wall the same way, flat on the subfloor: equal diagonals, square wall 5. Lines from corner to corner also find a rectangle’s center, and on a sheet of plywood equal ones show it is square 6.

Check opposite sides first. A trapezoid with equal slanted sides has equal diagonals too; only when both pairs of opposite sides match does equal diagonals mean square.

Now the arithmetic for a 12-by-16-ft frame, 144 by 192 inches. Square, each diagonal is the square root of 144² + 192², 240 inches, exactly 20 ft. Racked by a small angle d, one diagonal grows and the other shrinks, and their difference works out to 2 x 144 x 192 x sin d / 240, or 230.4 sin d. A half-inch difference, 240 1/4 against 239 3/4:

  1. sin d = 0.5 / 230.4 = 0.00217, so d is 0.124 degree.
  2. The 12-ft sides lean by 144 x 0.00217 = 0.3125 inch.
  3. Push the corner at the end of the long diagonal 5/16 inch along the 16-ft side.

The rule of thumb, move half the difference, says 1/4 inch: close, and short. The true amount depends on which side you move along; along the 12-ft side the same half inch takes 0.417 inch. Complete Plan: The Four-Square Stool aims for diagonals within 1/16 inch on a stool frame; Insert or Full-Frame: How New Windows Go In accepts 1/4 inch on an old window frame.

Work it out

On a 12-by-16-ft frame the diagonals read 240 1/4 and 239 3/4 in. How far does the corner at the end of the long diagonal need to move along the 16-ft side, in inches?

This exercise needs JavaScript.

Quick check

A frame’s two diagonals measure exactly the same. What else must be true before you can call it square?

Racking it square

A wall framed flat is squared before it is raised: push the corner at the end of the long diagonal until the two diagonals match, then hold it with sheathing or a let-in brace tacked in place, nailed off after the wall is up and plumbed 5. Why bracing holds a wall square is in Sheathing and Bracing; timber bents get the same check before raising in Raising Day: Assembly, Rigging, and Safety. A deck frame is squared the same way before decking or diagonal bracing locks it.

Cabinets and drawers follow the same rule. Every box glue-up skews one way or the other; Fine Woodworking’s tip is to set a squaring bar to the average of the two diagonals at dry fit and clamp it across the long diagonal while the glue sets 7. Christopher Schwarz glued a tool chest without checking and found it 1/16 inch out over its 18-inch depth, invisible, but enough that square sliding tills wouldn’t slide; he built the tills out of square to match, clamped inside the case itself 8. The numbers for a 30-by-36-inch cabinet case: square, each diagonal is the square root of 900 + 1,296 = 2,196, or 46.86 inches, 46 7/8 at the tape. Readings of 46 15/16 and 46 13/16, an eighth apart, mean the sine of the error is 0.125 x 93.72 / (4 x 30 x 36) = 0.0027, so the top has slid 30 x 0.0027 = 0.08 inch, about 5/64: one squeeze of a clamp across the long diagonal. Equal diagonals don’t catch twist; Rustic Stretch shows winding sticks for that.

Work it out

A cabinet case is 30 by 36 in. What should each diagonal measure when it is square, in inches, to two decimals?

This exercise needs JavaScript.

Small angles over long runs

Lines fanning from one point over a 20-foot run, angles exaggerated tenfold: 1/4 degree ends 1 1/16 inches off, 1/2 degree 2 3/32 inches, 1 degree 4 3/16 inches. Below, the same 1/8-inch slip of the tape on a 3-4-5-foot triangle puts its corner off 0.25 degree, 2.08 inches over a 40-foot wall, and on a 15-20-25-foot triangle off 0.05 degree, about 0.42 inch over the same wall.
A degree looks like nothing at the corner and like a mistake at the far end of the wall. Bigger triangles shrink it. Credit: StudyCorner original diagram · CC BY 4.0 · Source

An angle error grows in a straight line with distance: offset = run x tan(error). One degree is tan 1° = 0.01746, so over 20 feet, 240 inches, it is 4.19 inches, 4 3/16. Half a degree is 2 3/32 inches; a quarter, 1 1/16. A degree is about an inch in every 5 feet.

It is also why a framing square laid in a foundation corner is only a first look. Its 24-inch blade read 1/32 inch off at the tip becomes 480 x (1/32) / 24 = 5/8 inch at the end of a 40-ft wall; the 12-16-20 triangle, read just as carefully, is far closer. That is why the triangle should be big. On a 3-4-5-foot triangle, legs 36 and 48 inches and diagonal 60, a 1/8-inch slip in the diagonal shifts the corner by 60 x 0.125 / (36 x 48) = 0.0043 radian, 0.25 degree, which puts the far end of a 40-foot wall 2.08 inches off. The same slip on 15-20-25 moves the corner 0.05 degree, 0.42 inch at 40 feet. A square with 1/32 inch of error in its 2 feet is an angle error too; Framing, Combination, and Try Squares tests for it.

Work it out

A wall line leaves its corner 1 degree out of square. How far off is it 20 ft away, in inches?

This exercise needs JavaScript.

Estimate

On a 3-4-5-ft triangle, a 1/8-in slip in the diagonal turns the corner about a quarter of a degree. About how far off does that put the far end of a 40-ft wall?

This exercise needs JavaScript.

Tablets and manuals to look at

  • YBC 7289 is in the Yale Babylonian Collection, and Plimpton 322, the tablet usually read as a table of Pythagorean triples, in the Plimpton collection at Columbia University 1.
  • MacTutor’s “Pythagoras’s theorem in Babylonian mathematics” works through four tablets, including how the Babylonians may have found their square root of 2 1.
  • FM 5-426, Carpentry, chapter 4, draws batter boards and both squaring methods 3.
  • The Navy’s Builder 3 & 2, Volume 1, chapter 5, locates building corners by tape alone 4.

Square a corner on the lawn

With two tapes, four stakes, and string, lay out a 12-by-16-ft rectangle on a lawn or a driveway. Square the first corner with 6-8-10, the second with 12-16-20, set the last two corners by measurement, then measure both diagonals and adjust until they agree within 1/8 inch. Measure the diagonals of a doorway or a window frame in the house and work out, from the difference, how far out of square it is in degrees.

Lesson complete

Nice work.

1day streak
0/1today's goal
–correct

Teach it back

In two sentences, explain Checking for Square: 3-4-5 and Diagonals to a friend who missed it.

Up next · 12 min

Degrees, Pitch, and Slope

A road sign warns of a 100 percent grade. How steep is that slope?

Next lesson

Related lessons

Among the stars
Sources for this lesson
  1. 1
    J J O'Connor, E F Robertson. Pythagoras's theorem in Babylonian mathematics. MacTutor History of Mathematics, University of St Andrews. 2000. verifiedThe Babylonians were familiar with the theorem. A tablet in the British Museum reads, in translation, '4 is the length and 5 the diagonal. What is the breadth?' and works it: 16 from 25 leaves 9, and 3 times 3 is 9. The tablets discussed date from the Old Babylonian Empire, 1900 to 1600 BC. Yale tablet YBC 7289 shows a square of side 30 with its diagonals and the numbers 1;24,51,10 (1.414212963, against the square root of 2, 1.414213562) and 42;25,35, which is 30 times it: the diagonal. Plimpton 322, in the Plimpton collection at Columbia University, dates from about 1800 to 1650 BC and is usually read as a table of Pythagorean triples, though not all historians agree.
  2. 2
    J J O'Connor, E F Robertson. Pythagoras of Samos. MacTutor History of Mathematics, University of St Andrews. verifiedThe theorem now known as Pythagoras's theorem was known to the Babylonians 1,000 years earlier, but he may have been the first to prove it. To Pythagoras the square on the hypotenuse was a geometrical square built on the side, not a number multiplied by itself.
  3. 3
    FM 5-426, Carpentry. Headquarters, Department of the Army. 1995. verifiedPublic domain, approved for public release, dated 3 October 1995. Layout tools include a 100-foot tape for measuring diagonals and a framing square for checking squareness. Squaring lines (p. 4-5): the 6-8-10 method measures 6 feet along one line and 8 along the other and adjusts the lines until the diagonal is 10 feet; multiples may be used for large layouts, for example 12-16-20 for a layout 50 by 100 feet; for accuracy never start with a measurement of less than 6 feet. Diagonal method: in a rectangle the two diagonals are equal only when the corners are square; if not, move the lines until they are. Rafters (pp. 7-6 to 7-8): the step-off method; Type 1 rafter table on the face of the blade, first line the length of common rafters per foot of run (under 16 is 20.00, under 13 is 17.69), the other five lines not discussed; Type 2 on the back of some squares gives run, rise, and pitch for seven common pitches, for example a 1/6 pitch with a 12-ft run gives 12 ft 7 10/12 in; a try square squares lines down the sides.

    Also cited in On the Job Site: Kings, Cripples, and Four Quarter, Framing, Combination, and Try Squares.

  4. 4
    Builder 3 & 2, Volume 1 (NAVEDTRA 14043). U.S. Navy, Naval Education and Training Professional Development and Technology Center. 1993. verifiedPublic domain. Joints (p. 3-40): to ensure a tight joint, always cut on the waste side of the line, never on the line itself; grooving the waste side with a knife or chisel helps a backsaw start. Building layout (pp. 5-11 to 5-12): without a transit, corners can be located with tapes by the Pythagorean theorem: a right triangle with sides 35 and 40 feet has a hypotenuse of about 53.1 feet, so tapes held at 53.1 from one point and 35 from another meet at the corner, and both diagonals of the rectangle should measure 53.1; or use any triangle in the proportions 3:4:5, such as 30, 40, and 50 feet, run with two tapes from the base line.

    Also cited in Measuring and Marking Like a Carpenter.

  5. 5
    Builder 3 & 2, Volume 2 (NAVEDTRA 14044). U.S. Navy, Naval Education and Training Professional Development and Technology Center. 1994. verifiedPublic domain. Wall layout (pp. 1-23 to 1-24): plates are marked for corner posts, studs, and openings; the first stud from a corner is placed 15 1/4 inches from the end and the rest follow 16 inches on center so panel edges fall on stud centers; mark the 16-inch layout before the rough openings. Squaring walls (p. 1-28): a framed wall is squared on the subfloor; when the diagonal measurements are equal the wall is square; a let-in brace may be tacked on before raising. Framing square (pp. 2-4 to 2-13): the face is the side seen with the blade in the left hand, tongue in the right, heel away; the blade is 24 by 2 inches, the tongue 14 to 18 by 1 1/2; face edges are graduated in 1/8 or 1/16, the back's outer edges in twelfths, the inner tongue in tenths, the inner blade in thirty-seconds on most squares; 12 and 12 give a bridge measure of 16.97, about 17; by trade custom the unit of run is 12 inches on the tongue; twelfths-scale example: a 10-ft run and 6 ft 5 in rise set at 10 and 6 5/12 read 11 11/12, so the rafter is 11 ft 11 in; four scales (tenths, twelfths, hundredths, octagon); the hundredths scale is on the back of the tongue near the heel, longer lines every 25 hundredths, with sixteenths below for conversion; the octagon scale is down the middle of the face of the tongue: for an 8-inch newel set dividers from the first to the eighth dot and lay the distance off either side of the centerlines, equal to half a side of the octagon; three tables: rafter table on the face of the blade, brace table on the back of the tongue, Essex board measure on the back of the blade; the brace table runs equal runs from 24/24 to 60/60 by threes (24 gives 33.94, 27 gives 38.18, 30 gives 42.43) and ends with 18:24:30, the 3:4:5 proportion; Essex: inch graduations are widths, the column under 12 lists lengths 8 to 15 ft, and a 10-ft 1x10 reads 8 4/12 (8.33) board feet; multiply by thickness; longer pieces are split (25 ft as 10 plus 15 gives 20 10/12). Rafter table on the face covers unit rises of 2 to 18 inches; a 7-inch rise reads 13.89 per foot of run, a 6-inch rise 13.42, and a 6-inch rise on a 25-ft span gives 167 3/4 inches; round hundredths to sixteenths by multiplying by 16. Square gauges: one on the tongue at the unit rise, one on the blade at the unit run.

    Also cited in Framing, Combination, and Try Squares, Measuring and Marking Like a Carpenter.

  6. 6
    Gregory Mills. How to Measure and Mark Wood. Pro Tool Reviews. 2021. verifiedPublished 16 June 2021. For ultra-precision, mark with a knife (a utility knife, a small pocket knife, or a marking knife); for everyday marking the author uses a 0.7 mm mechanical pencil (0.5 breaks, 0.9 is thick). Mark a cut with three crow's feet, triangular marks whose point is the measurement, so one mismeasure shows by falling out of line. Put an X on the waste side of the line so the saw kerf goes on that side. Lines from corner to corner find the center of a rectangle, and equal diagonals show it is square. A story pole, a long 1x2, carries every critical measurement of a cabinet job.

    Also cited in Measuring and Marking Like a Carpenter.

  7. 7
    Workshop Tip: Shopmade clamp squares up any carcase. Fine Woodworking. 2020. verifiedPublished 15 October 2020. Dry-fit the cabinet with its clamps and use the average of the two diagonal measurements to size a squaring bar: a strip with a fixed stop and an adjustable stop set at that dimension. All box glue-ups tend to skew one way or the other; place the bar across the long diagonal to pull the case square, and screw it to the back while the glue dries.
  8. 8
    Christopher Schwarz. Your Carcase is Not Square. Now What?. Popular Woodworking. 2012. verifiedPosted 20 August 2012. A travel-size Anarchist's Tool Chest glued up without squaring ended up out of square about 1/16 inch over its 18-inch depth: invisible, but the chest's sliding tills would not slide if built square. Doors are usually built square and oversized, then planed to fit the case's parallelogram; Schwarz builds drawers and tills out of square to match, clamping them in the carcase itself.

    Also cited in Dovetailing the Carcase and Skirts, Lid, Tills, and Paint.