Flat illustration of a house roof cut away to show framing, deck, underlayment and shingles, with raindrops running down to a gutter
Roof Basics

How a Roof Works: Layers, Parts and Water Flow

A roof works by stacking layers that each handle a different job: framing that carries the load, a solid deck, a water-resistant underlayment, metal flashing at every joint and an outer covering that sheds rain down the slope. Gravity does the rest, moving water and melted snow from the ridge to the eaves, where gutters and downspouts carry it away from the walls.

The part most homeowners never see is the layer beneath the shingles. When wind lifts a shingle or rain is driven sideways under it, the underlayment, the flashing and the deck decide whether the attic stays dry. That is why roofers describe a roof as a system instead of a surface, and why this guide follows the layers in the order they are installed.

The layers, from the framing up

Every roof is built from the inside out. Rafters or prefabricated trusses carry the weight, the deck gives the covering something solid to attach to, and each layer above is designed to catch whatever water gets past the one before it. The table summarizes the usual stack for an asphalt shingle roof, with numbers from the sources listed at the end.

LayerJobDetail the sources give
Framing (rafters or trusses)Carries the roof’s weight down to the wallsDeck nailing is specified for framing spaced 16 or 24 inches apart
Deck (sheathing)A solid, continuous surface for the coveringPlywood or similar panels, 7/16 to 5/8 inch thick in the IRC summary
Edge membraneSeals the eaves, valleys and wall jointsDOE: self-adhering membrane in all valleys and wherever the roof meets a wall
Drip edgeCovers the roof edge at the eaves and rakesIRC: corrosion-resistant metal at least 0.019 inch thick
UnderlaymentSecondary water barrier under the coveringIRC: one layer on slopes of 4:12 or steeper, two layers from 2:12 up to 4:12
FlashingMetal that bridges joints, chimneys and vent pipesIRC: step flashing against vertical sidewalls
CoveringSheds water; shingles, metal, tile or membraneIRC: asphalt shingles only on slopes of 2:12 or steeper
VentilationMoves air through the attic to carry off moistureVent area of at least 1/300 of the attic floor area, split high and low

Framing and deck

The frame sets the shape of the roof, and the deck turns that shape into a surface. Decking is usually plywood or oriented strand board nailed across the rafters or trusses. Shingles need a solid base, so the IRC requires asphalt shingles to be fastened to solidly sheathed decks, and the 2006 code summary we used lists panels 7/16 to 5/8 inch thick.

Every layer above rests on the deck, so a soft or damaged panel becomes a problem for the whole roof.

Underlayment: the second line of defense

Underlayment is the thin sheet laid over the deck before any shingles go on. It does two things: it keeps the deck dry while the roof is being built, and it acts as a backup barrier if wind-driven rain gets under the covering later. Materials range from asphalt-saturated felt to synthetic sheets and self-adhering membranes, and the choice is covered in our underlayment comparison.

The amount you need depends on slope. On a roof of 4:12 or steeper, the IRC calls for a single layer of 36-inch-wide sheets, each overlapping the one below by 2 inches, with end laps offset by 6 feet. On the gentler range from 2:12 up to 4:12, it requires a double layer: a 19-inch starter strip at the eave, then 36-inch sheets lapped 19 inches. Those figures come from the 2006 code as summarized by an extension service, so your local edition may differ.

Drip edge, valleys and flashing

Water behaves badly at edges and joints, which is where metal and membrane come in. A drip edge is a metal strip along the eaves and the sloping rake edges. The U.S. Department of Energy’s guidance for high-wind areas says installing it over the membrane helps lock the roof edge against wind and moisture, with the metal extending at least a half inch below the sheathing and overlapping the top of the deck edge by at least 2 inches.

Valleys and wall joints are the next weak points: DOE calls valleys and openings through the deck some of the most vulnerable spots for water intrusion. Its roof-water-management page recommends self-adhering membrane in every valley and wherever the roof meets a wall, metal flashing over that membrane around chimneys and vent pipes, and ice and water shield along the roof edges. Against a vertical sidewall, the IRC calls for step flashing, a series of small bent metal pieces woven between shingle courses. An open metal valley lining is 24 inches wide.

Anything wider than 30 inches that sticks up through the slope, such as a chimney, also needs a small peaked diverter on its uphill side. Our explainer on roof flashing covers each type.

Flat illustration of a roof edge in cross section with a metal drip edge, shingles, a gutter and arrows showing rainwater flowing off the eave

How water travels across the roof

Rain does not fall straight through a roof; it runs. On a sloped roof the covering is lapped so that each course sits over the one below, which means water meets only the exposed face and the downhill edge of each shingle. That water moves to the nearest valley or eave, picking up more on the way.

Valleys collect from two roof planes at once, so they carry more water than any other part of the surface. At the eave the water leaves the roof edge and enters the gutter, the gutter hands it to the downspouts, and the downspouts should discharge well away from the foundation. A blocked gutter or downspout leaves water standing at the lowest edge of the roof, which our guide to how gutters work explains.

Slope decides what works

Pitch is written as rise over run, so a 6:12 roof rises 6 inches for every 12 inches it extends. Steeper roofs shed water and snow faster, and the code sets a floor for each material. Asphalt shingles are limited to 2:12 or steeper, and between 2:12 and 4:12 the double underlayment above is required. Below 2:12 that code section does not allow shingles, so flatter roofs need a different kind of covering.

Ventilation: the roof’s other job

A roof also has to breathe. Building Science Corporation says the main purpose of attic ventilation is to control moisture buildup and, in some climates, ice dams. It adds that most codes set net free vent area at no less than 1/300 of the attic area, ideally with equal area low at the soffits and high at the ridge, so air flows through the whole length of the attic.

What to look for from the ground

You can learn a lot from the yard. Look for shingles that are curled, cracked or missing, dark streaks, sagging lines along the ridge and gutters pulling away from the fascia. Inside, check the attic with a flashlight from the hatch for stains on the underside of the deck and for damp insulation.

Write down what you see and take photos, then call a licensed roofer for anything beyond cosmetic wear. Knowing the layers helps you describe a problem accurately and understand an estimate when it comes.

Putting it together

  1. Frame and deck give the roof its shape and a solid surface.
  2. Edge membrane, drip edge and underlayment form the hidden water barrier.
  3. Flashing seals valleys, walls, chimneys and vent pipes.
  4. The covering sheds the water, and ventilation keeps the attic dry.

When any of these layers fails, the symptoms usually show up somewhere else: a stain on a ceiling, a damp attic, a gutter that overflows. Understanding the system makes those clues easier to read.

Frequently asked questions

What are the layers of a roof?

From the inside out: rafters or trusses, a solid deck, underlayment, flashing and drip edge at the edges and joints, and the outer covering such as shingles. Ventilation runs through the attic space beneath.

What does underlayment do on a roof?

It is a secondary water barrier between the deck and the shingles. It keeps the deck dry during construction and limits leaks if wind-driven rain gets under the covering later.

How steep does a roof need to be for asphalt shingles?

The International Residential Code allows asphalt shingles only on slopes of 2:12 or steeper, and requires double underlayment from 2:12 up to 4:12. Local codes may add conditions.

Why do roofs need ventilation?

Ventilation moves moist attic air outdoors before it condenses on the deck. Building Science Corporation notes that most codes set vent area at about 1/300 of the attic area, split between low and high openings.

Sources

The layer sizes, slopes and flashing rules come from the sources below. Codes change by edition and by jurisdiction, so check your local building department before relying on a number.