You're planning to replace windows or install new ones, and you need to know: what size window actually fits this opening, and does it meet building code for egress? A window size calculator helps you measure rough openings accurately and determines whether you need code-compliant windows or standard replacements.
What This Calculator Does
This window size calculator takes your rough opening (RO) measurements and determines the right window size to order. It accounts for the fact that windows are ordered slightly smaller than the rough opening to allow for shimming and settling. It also checks building codes for minimum escape window sizes in bedrooms (egress requirements). The calculator handles replacement windows in existing frames and new installations in fresh rough openings.
How to Use This Calculator
Measure your rough opening width (RO width) from the inside surface of the left stud to the inside surface of the right stud. Measure rough opening height (RO height) from the top of the header to the sill. These are critical measurements-measure twice to be sure.
For replacement windows in existing frames, subtract 1/2 inch from both RO width and height to get the window unit size to order (this allows space for shims and sealant). For new construction rough openings, subtract 1 inch from width and 1.5 inches from height (more clearance for shimming and leveling).
If this is a bedroom window, check if it meets egress code: minimum 5.7 sq ft opening (or 5 sq ft in some jurisdictions), minimum width of 20", minimum height of 24", and sill height no higher than 44" from floor. The calculator verifies these requirements and flags if your window is undersized.
The Formula Behind the Math
For replacement windows:
Window unit size = RO dimensions − 0.5 inches (width and height)
For new construction:
Window unit size = RO dimensions − 1.0 inch (width), minus 1.5 inches (height)
Minimum egress (bedroom window):
Example (Replacement):
Your existing rough opening is 36" wide by 48" tall.
Window unit size = 36 − 0.5 = 35.5" wide, 48 − 0.5 = 47.5" tall.
Standard window sizes come in 2" increments, so order a 35" × 47" or the next available standard size (often 36" × 48" depending on manufacturer).
Example (Egress check):
Your bedroom window is 32" wide by 40" tall.
Area = (32 × 40) / 144 = 1,280 / 144 = 8.9 sq ft ✓ (meets 5.7 minimum)
Width = 32" ✓ (meets 20" minimum)
Height = 40" ✓ (meets 24" minimum)
Sill height at 36" from floor ✓ (meets 44" maximum)
This window meets egress code and is legal for a bedroom.
Our calculator does all of this instantly-but now you understand exactly what it's computing.
Replacement Windows in Existing Frames
When replacing windows in existing homes, you're removing the old unit and fitting a new one into the existing rough opening. Measure inside the existing frame, then subtract 0.5" to allow space for shims and sealant. Replacement windows come with trim flanges that overlap the frame, hiding gaps and simplifying installation. Order the window 0.5" smaller than your RO so it fits without forcing.
New Construction Windows in Fresh Rough Openings
When building new, you frame the rough opening, then install the window. Framing creates slightly larger, less precise openings than existing walls. Subtract 1.0" from width and 1.5" from height to give the window unit clearance on all sides for shimming, leveling, and flashing tape. This prevents binding and ensures the window seats correctly.
Bedroom Egress Windows and Building Code
Bedrooms (any room used for sleeping) require at least one emergency escape window that meets egress code. The window must open to the outside, have minimum dimensions (roughly 20" × 24"), and provide 5.7 sq ft of unobstructed opening area. The sill must be no higher than 44" from the floor so a person can reach and escape quickly. Check your local building code-some jurisdictions have slightly different requirements. The calculator flags whether your window meets code.
Basement Egress Windows and Wellbeds
Basement bedrooms need egress windows sized for emergency escape. If the window opens to a window well (a recessed area in the foundation), the well must have minimum dimensions and potentially a ramp or ladder for escape. Measure the rough opening carefully, then order a window sized appropriately. Wellbeds often require custom window sizes or smaller units, which are more expensive.
Tips and Things to Watch Out For
Measure the rough opening carefully at three points (top, middle, bottom). Older homes have walls and frames that aren't perfectly square. If width varies, use the smallest measurement. If height varies, again use the smallest to ensure the window fits everywhere.
For replacement windows, measure the existing window size, not the opening. Sometimes the previous installer sized the window too small or large. Measure the actual rough opening inside the existing frame, not the window that's installed.
Understand the difference between RO (rough opening) and unit size (actual window). RO is the framed space in the wall. Unit size is the window you order. They're different by 0.5–1.5 inches depending on application.
Check for square by measuring diagonals. If your RO is truly 36" wide by 48" tall, the diagonals should both measure the same (roughly 60" if it's square). If diagonals are different, the opening is racked (out of square), and you might need to shim heavily or straighten the opening.
Verify egress requirements for all bedrooms. Even if a bedroom window seems small, check code. A 36" × 36" window is 9 sq ft, which exceeds 5.7 sq ft requirement, so it's legal. The calculator helps verify compliance before you order.
Always order 10-15% more material than your calculation to account for waste, cuts, and breakage. This applies to sealants, flashing tape, and shims. Budget an extra unit's worth of materials for mistakes, but don't order extra window units unless you're stocking for future repairs.
Consider window location for passive solar gain. South and west-facing windows gain heat in summer and lose heat in winter. North-facing windows lose heat year-round. Oversizing south-facing windows in cold climates improves passive solar gain; oversizing west-facing windows in hot climates increases cooling load. The calculator sizes based on measurements, not solar orientation, but location affects long-term comfort and energy costs.
Frequently Asked Questions
What if my rough opening is not square?
Measure width at the top, middle, and bottom. Measure height at the left, center, and right. If measurements vary by more than 1/4 inch, your opening is slightly racked (tilted). Use the smallest measurement for ordering the window. During installation, shim the window to make it square, which may squeeze the frames or require careful trimming.
Can I order a slightly larger window to cover a slightly-too-large rough opening?
No. Window units come in standard 2" increments. If your RO is 37" wide but you can order 36" or 38", you'd need significant shimming with 38", which can cause binding. Use 36" and shim the extra inch with rigid foam and sealant.
Do I need a larger window for basement bedrooms than upstairs?
Egress requirements are the same regardless of location. A basement bedroom needs the same minimum 5.7 sq ft opening. However, wellbeds (windows opening into recessed areas) must size to the wellbed dimensions, not just the window opening, so check the wellbed size first.
What's the difference between a single-hung and double-hung window in terms of sizing?
Sizing is the same. The difference is operation: single-hung has a fixed top sash and movable bottom, while double-hung has both movable. For egress calculations, use the actual opening size regardless of window type. A single-hung might provide more opening space (only bottom sash moves) than a double-hung (split opening).
Can I use an awning or hopper window for bedroom egress?
Some codes allow awning windows (hinged at top, open outward) if they meet opening area and dimension requirements. Hopper windows (hinged at bottom, open inward) are less common for egress. Check your local code-many prefer casement (side-hinged) or double-hung for egress because they open fully without obstruction.
What if my window is very large (like a patio door opening)?
Measure width and height of the RO as usual. For a 6-foot-wide by 8-foot-tall opening, subtract 1" from width and 1.5" from height, giving you a 70" × 94.5" unit to order. Large openings often require custom sizes and come at a premium. Check with window suppliers for availability and cost.
How does window frame material affect sizing?
Frame material (wood, vinyl, aluminum, fiberglass) doesn't change unit sizing. The RO-to-unit relationship is the same. Material affects cost, maintenance, and insulation value, not dimensions. Order based on measurements; choose material based on your needs.
Should I use standard sizes or custom sizes?
Standard sizes (in 2" increments) are cheaper and readily available. Custom sizes cost more but fit oddly-framed openings perfectly. If your RO is exactly 36" × 48", a standard 36" × 48" unit is fine. If it's 36.5" × 48.25", you either shim a standard unit or order custom at higher cost.
What if the existing window is the wrong size-should I enlarge the rough opening?
Only if necessary and only if structurally possible. Enlarging an opening means removing headers, framing, and potentially moving studs. For replacement, it's usually cheaper to use a smaller standard-size window and shim the extra space than to enlarge the opening. Consult a contractor if you want to enlarge.
Related Calculators
Our siding calculator helps estimate material if you're replacing siding around new windows. Paint calculator determines finishing material for window trim. Material cost estimator budgets the full window replacement project including installation labor.