Rough Opening Calculator

The rough opening is the unit plus the space you need to shim it straight. Get that space wrong in either direction and the same unit fails two different ways: too tight and it cannot be pushed square, too loose and the fasteners have nothing solid to land in.

For a window this is the outside of the frame. For a prehung door it is the slab width, commonly a round number like 30, 32 or 36.
Prehung doors only. The side jamb stock on each side, and the head jamb above.
The manufacturer figure for your unit, not a universal constant. Common working values run 1/4 to 1/2 inch per side.
Windows: shim space at the sill. Doors: the gap under the jambs for finished flooring, threshold or carpet.
Optional. Fill the next five to check an opening that is already framed.
Optional pair. Two equal diagonals means the opening is square.
Rough Opening Calculator — Window and Door Shim SpaceBuildFigure

The rough opening is the unit plus the space you need to work

A rough opening is not a tolerance. It is a deliberate working gap, and every part of it has a job. The side gaps are where shims go so the jambs can be brought plumb regardless of what the wall is doing. The head gap lets the unit sit level when the header is not, and on a door it also gives the frame somewhere to go if the framing above settles. The sill or floor gap is the one people forget: on a window it is shim space, but on a prehung door it is the thickness of whatever flooring has not been installed yet.

That last point causes more callbacks than anything else on this page. A door hung before the floor goes in, with no allowance made, either drags on the new flooring or has to come back off. Decide the finished floor thickness first, then set the opening height.

Why the shim allowance is an input and not a constant

Published rough opening tables print figures like "slab width plus two inches" for doors and "unit size plus half an inch" for windows, and both are real habits that work most of the time. They are also not what your unit was made to. Manufacturers publish rough opening dimensions per product line, and they differ, sometimes by a quarter inch and occasionally by more where a nailing fin or an integral sill pan changes the geometry. Flanged windows, block-frame replacements and full-frame new-construction units all want different things.

So the shim fields default to half an inch per side because that is a common working value worth checking against, and the result panel shows you what the shorthand would have given so you can see the difference. Neither number is authoritative. The figure on the installation sheet for the unit sitting in your driveway is.

Too tight and too loose fail in opposite ways

Shim space each sideWhat happens
None, or the unit is wider than the holeNothing goes in. Widening a bearing wall opening is structural work.
Under 1/8 inchThe unit goes in but cannot be squared. A wall that is out of plumb transfers straight into the frame, and the sash or door binds.
1/8 to 1/4 inchShims are hard to drive without bowing the jamb, and there is no room left to correct anything.
1/4 to 3/4 inchThe working range. Room to plumb, level and square without stacking shims deep.
3/4 to 1-1/4 inchShim stacks get tall and want to roll when the fastener is driven. Usable with care.
Over 1-1/4 inchFasteners bridge air. The fix is furring stock fastened to the framing, not more shims.

The failure at the loose end is the one people underestimate. A screw that passes through a deep shim stack is a lever, and every time the door slams it works. Furring the jamb in with ripped stock gives the shim something to bear on and the fastener something to bite, which is why an oversized opening is a carpentry problem rather than a hardware problem.

Measure the opening in five places, not two

Framed openings are rarely rectangles. Studs crown, headers deflect, and a wall that was plumb at framing may not be after the roof went on. Measure the width at the top, the middle and the bottom, and the height at both jambs. The unit has to pass through the smallest of those, not the average. Then pull both diagonals: equal diagonals mean a square opening, and a difference of more than a quarter inch or so means the opening is racked and the shims will be doing work they were not meant to do.

If the opening is out of square by a lot, the honest options are to re-frame it, or to accept that the trim will have to hide the difference and the unit will be set square inside a crooked hole. Both are normal. Pretending the hole is square and forcing the unit into it is what produces a window that will not lock.

What changing an opening size drags in with it

Enlarging an opening in a wall that carries load is not a trim decision. The header has to be sized for the new span by the span tables your jurisdiction has adopted, or by an engineer, and it needs a permit almost everywhere. The header and beam load calculator works out the load a header carries and the reactions at its ends, which is the input side of that question. It deliberately does not size a member, and neither does this page. Nothing here is a verdict that an opening is structurally acceptable.

There is a second thread to pull before you change any bedroom window. Sleeping rooms commonly have to have an opening that meets egress requirements for size, height above the floor and clear operating area, and those requirements come from the adopted code and can be applied differently by the local building department. Shrinking a window, or replacing a full-frame unit with an insert that loses an inch and a half of clear opening, can quietly break that. Ask the building department before you order, not after.

Once the opening is right, the work moves outward: the flashing and sealing calculator covers the tape, pan and sealant quantities, stud wall handles the framing around it, and if the unit is a door, run the door swing planner before you decide which way it opens.

Questions people ask

What is the rough opening for a 36 inch prehung door?

With a 3/4 inch jamb on each side and a half inch shim space, this calculator gives 38-1/2 inches wide. The figure printed in most tables is 38 inches, which is the same door with a quarter inch of shim space per side. Both are used in the field, and both work, but they are not interchangeable if you also want room to plumb the jambs in a wall that is out of true. The height works the same way: the slab plus the head jamb plus head shim plus whatever the finished floor will be. Use the installation sheet for the unit you bought and put its numbers in the shim fields.

The opening is a quarter inch too narrow. Can I just plane the jamb?

On a non-bearing partition, trimming a jamb or shaving a stud is sometimes done, but it costs you the shim space and the unit ends up locked to whatever the wall is doing. On a wall that carries load, no part of this is a trimming decision. Cutting into a king stud or trimmer changes the load path down to the foundation, and widening the opening means a header sized for the new span. That is a permit and a span table or an engineer, not a block plane. The cheaper answer is usually to order the next size down.

Do I measure the rough opening before or after drywall?

Before. The rough opening is the framed hole, stud to stud and header to floor or sill, with nothing on it. If drywall has already been wrapped into the opening you are measuring a finished opening, which is smaller by the board thickness on each face it returns into, and the unit will not fit the number you wrote down. If you are working in an existing wall and cannot see the framing, cut back the finish enough to find the trimmers before you order anything.

Does spray foam replace shims?

No. Low-expansion foam seals the gap and stops air moving through it, and that is a real job worth doing. It does not hold a jamb straight, it does not carry the weight of a door, and high-expansion foam can bow a jamb enough to make the door bind. The sequence people use is: set the unit, shim and fasten it plumb and square, confirm the door or sash operates, then foam the remaining gap. Foam first and you are gluing a crooked frame in place.

My window unit size and rough opening are both listed. Which one do I use?

The rough opening figure, and only that one, for framing. Unit size, call size and nominal size are three different things in the window trade and the difference between them is not consistent. A window called 3050 is not 36 by 60 inches at the frame, and the frame is not the rough opening. Frame the hole to the published rough opening dimension for that exact product, then use this page to sanity check the shim space you are left with once the unit is actually on site and you can put a tape across it.

Related