Screw length is its own question, separate from how thick the screw is (its gauge) and the pilot hole. Too long and it comes out the back. Too short and too little of it reaches the board underneath. A simple proportion gives a starting length.
About two-thirds of the screw's length should end up in the base board underneath, and a third in the top board. So start with a screw about three times the top board's thickness, as long as its tip still stops short of the back of the base board.
A third in the top board, two-thirds in the base
When a screw joins two pieces of wood, the top piece is just being held down. The screw's grip comes from the threads biting into the base piece underneath. So the screw passes all the way through the top board, and about two-thirds of its length ends up in the base board.
The base board often sets the limit. When the base board is no more than twice as thick as the top board, it can't take two-thirds of the screw, so use the longest stock screw that stops short of the back face.
How to figure the length
Length ≈ three times the top board's thickness. Then check it against the two boards stacked together: the screw has to be shorter than the stack, so round down if you need to.
Worked example, joining two 2x4s: a 2x4 is actually 1½" thick (see the trap below). Three times 1½" is 4½", longer than the 3" stack, so here the base board sets the limit. A 2½" screw goes through the first board and 1" into the second, leaving ½" of wood behind the tip.
Common joints: a good starting length
Practical starting points for typical wood-to-wood joints (measure your actual boards and adjust, these aren't rigid rules):
- Two 2x4s (1½" + 1½"): a 2½" screw.
- ¾" board or plywood to a 2x frame (¾" + 1½"): a 2" screw. Three times ¾" is 2¼", the full stack, so go one size down.
- ¾" to ¾" (cabinets, furniture, boxes): a 1¼" screw, since the stack is only 1½".
- ½" stock to a frame (½" + 1½"): a 1½" screw, with 1" of it in the frame.
- A door hinge or hardware: use the screws or the length the hinge or hardware maker gives.
For plywood, take the thickness from the panel's stamp, as in 3/4 plywood actual thickness.
Each of these puts about two-thirds of the screw in the base, or as much as the base allows, so once you know the two thicknesses you can size any joint the same way.
Watch the “a 2x4 is 1½ inches” trap
Screw length is set by the actual thickness of your boards, and dimensional lumber is smaller than its name. A “2x4” is really about 1½" × 3½", a “1x” board is ¾" thick, and so on. Size your screw for 1½", not 2". Get the real thickness from the nominal-vs-actual lumber chart.
Too long or too short
Too long and the tip comes out the back face of the base board, into a finished surface or into wiring or pipes behind it. Too short and too little of the screw reaches the base piece. When you're unsure, hold the screw against the edge of your stacked-up boards and eyeball it: you want the point to stop short of the back face. If you have to miss, err a hair short rather than punching through.
Length is only half the screw question
Length is one of two choices. The other is the screw's thickness, its gauge (a #6, #8, #10, and so on), and the pilot hole that matches it. For the right gauge and the exact pilot-hole bit for your wood, use the finder. And a longer screw joining two pieces wants a clearance hole in the top board so it pulls the joint tight, which the three-holes guide covers.
Now pick the gauge & pilot
Find your pilot-hole sizePocket-hole screws don't follow this rule (their length is set by the jig and your material thickness) so use the pocket-hole screw selector for those.
Joints with their own rules
The rule above is for wood-to-wood joints. Drywall screws, wall anchors and masonry screws each follow their own length rules. For drywall, see what size drywall screws to use.
The pilot hole for your screw.
Get the pilot-hole size for your screw