Nails & Numbers

HomeRoofing › Roof Flashing Calculator

Roof Flashing Calculator

IRC R905.2.8, quoted, including the drip edge nobody reads

A valley is longer than its run twice over. Diagonal in plan, then up a slope, so a fourteen foot run is twenty-two feet of valley, and both multiplications get skipped.

Flashing takeoff

ft
ft
in
in
no.
ft
ft
in
in
in
no.
%

Every dimension here is quoted from IRC R905.2.8 as printed in the 2018 Seattle Residential Code. Pipe boots are sent to the manufacturer by R905.2.8.4, so there is no code dimension for one.

Specification summary

Generated from on . Reopen that address to reproduce these figures exactly.

Entered

Result

This figure is drawn from the valley you type in above.
The run, the plan diagonal and the true length

Prices for roof coverings and tear-off

The published figures for roof coverings and tear-off are on the roof replacement cost calculator, with the byline, the publication date and the caveats that go with them. They are not repeated here, because the same table on two pages is worth less than one table you can find.

This site publishes no price of its own. Why, and what that means for these figures.

Worked example

A 40 ft by 28 ft roof at 6:12, two valleys over 14 ft runs, 12 ft of sidewall, a 36 by 24 in chimney and three pipes.

  1. Each valley is 22.1 ft, not 14. Fourteen feet of run becomes 19.8 in plan because the valley runs diagonally across the corner, then 22.1 once the slope factor applies. That is 58% more than the number on the plan.
  2. Open valleys need 24 in of lining, per R905.2.8.2, so two valleys is 88.5 square feet of metal.
  3. Drip edge goes at eaves AND rakes. R905.2.8.5 says both, and the rakes are the sloping edges: 67.1 ft of rake against 84 of eave, so skipping them halves the order.
  4. Sixteen ten-foot pieces, and every joint laps 2 in, which is 2.7 ft of drip edge that ends up overlapped. Fasteners at 12 in on centre is 152 of them.
  5. Thirty-three step flashings, one per shingle course up 13.4 ft of sloped sidewall, each at least 4 by 4 in.

Flashing is a small material cost and it is where roofs leak. Every figure on this page is a minimum from R905.2.8 rather than a preference, and the valley arithmetic is the one that changes the order.

The formula

A valley is the hypotenuse of a hypotenuse:

valley = run × √2 × √(144 + rise²)/12
run
one leg of the corner, in plan, which is what gets measured
√2
the diagonal across that corner, still in plan
slope factor
and then up the roof, which nobody applies to a valley

At 6:12 those two multiply to 1.58, so a valley is a bit over half again as long as the run. On a steeper roof it is worse: at 12:12 the factor is 2.0, and the valley is exactly twice the run.

Five subsections, and four of them carry a number

R905.2.8.1 sets the material. Base flashing is corrosion-resistant metal of at least 0.019 in nominal thickness, or mineral-surfaced roll roofing at not less than 77 lb per 100 square feet. Cap flashing is metal at the same thickness.

R905.2.8.2 sets the open valley width, not less than 24 inches. That is for open valleys, where the lining is exposed; a closed valley is a different detail and the width figure does not transfer.

R905.2.8.3 sets sidewall flashing at 4 by 4 inches minimum, and adds the sentence that matters more than the dimension: where siding is provided, the vertical leg shall be CONTINUOUS UNDER the siding. Flashing fitted after the siding is on is the wrong way round and no amount of sealant fixes it.

R905.2.8.5 sets the drip edge, at eaves and rake edges both, lapped not less than 2 in at joints, extending at least 1/4 in below the sheathing and 2 in back up the deck, fastened at not more than 12 in on centre. That is four dimensions in one sentence and the one people miss is the first: rakes as well as eaves.

R905.2.8.4 is the exception that proves the pattern. Front wall, soil stack, vent pipe and chimney flashing are sent to the shingle manufacturer's printed instructions, so there is no code dimension for a pipe boot and this page does not invent one.

The valley arithmetic, and why it is missed twice

Two multiplications, and they compound.

First, the valley is diagonal in plan. Where two roof planes meet at a corner, the valley bisects a right angle, so its plan length is the run times root two. Fourteen feet of run is 19.8 ft before anything leaves the ground.

Then it climbs. The valley is on a roof, so the slope factor applies to it exactly as it applies to the roof area. At 6:12 that is another 1.118, taking 19.8 to 22.1.

Together, 1.58 at 6:12. On a 12:12 roof the two factors are root two and root two, so the valley is exactly twice the run, which is a pleasing result and an expensive one.

People who know about the slope factor still tend to apply it to the area and forget the valley, because a valley reads as a line on a drawing and lines do not obviously have slope factors. This is the same mistake as measuring a roof by its footprint, one dimension down.

Flashing is cheap and it is where roofs leak

The material cost of everything on this page is small against the shingles. The failure cost is not.

Water finds the joints. A field of shingles is a repeated detail that has been tested a billion times. A chimney, a sidewall or a valley is a one-off, made on site, by whoever was there that day.

The order of assembly matters more than the material. Step flashing goes on course by course as the shingles go up, each piece lapped by the one above; the vertical leg goes under the siding. Fitted afterwards, as a single continuous piece caulked to the wall, it is a gutter pointing at the wall rather than away from it.

Chimneys need two pieces, not one. Base flashing turns up the masonry, counter or cap flashing is let into a mortar joint and laps down over it. The gap between them is deliberate: it lets the chimney and the roof move independently, which they will.

And sealant is not flashing. It has a service life measured in years and the roof has one measured in decades, so anything relying on it has a scheduled failure date nobody wrote down.

Frequently asked questions

How do you calculate valley length?
Run times root two, then times the slope factor. The root two is the diagonal across the corner in plan; the slope factor is the climb. A 14 ft run at 6:12 is 19.8 ft in plan and 22.1 ft of actual valley, which is 58% more than the run.
How wide does valley flashing need to be?
Not less than 24 inches for an open valley with metal lining, per IRC R905.2.8.2. That figure is specifically for open valleys, where the lining is exposed. Closed valleys are a different detail and the width does not carry over.
Does the code require drip edge?
Yes, at eaves and rake edges both, per R905.2.8.5. The same sentence sets four more dimensions: joints lapped not less than 2 in, extending at least 1/4 in below the sheathing and 2 in back up the deck, and fastened at not more than 12 in on centre. The rake half is the part most often skipped.
What size is step flashing?
Not less than 4 inches high and 4 inches wide, per R905.2.8.3. One piece per shingle course, so a 13.4 ft sloped sidewall at 5 in exposure takes 33 of them. The same section also requires the vertical leg to run continuous under the siding.
Can I install flashing after the siding?
Not correctly. R905.2.8.3 says the vertical leg of the flashing shall be continuous under the siding where siding is provided. Fitted afterwards it sits on top of the siding, which turns it into a channel pointing at the wall, and sealant does not change that.
How thick does flashing metal need to be?
Not less than 0.019 inch nominal, corrosion resistant, for both base and cap flashing per R905.2.8.1. Base flashing may alternatively be mineral-surfaced roll roofing weighing not less than 77 lb per 100 square feet.
What about pipe boots and chimney flashing dimensions?
The code does not give any. R905.2.8.4 sends front wall, soil stack, vent pipe and chimney flashing to the shingle manufacturer's printed instructions, so there is no dimension to quote and this page does not invent one.

Check these numbers yourself

How every figure here is verified: Sources & Method. Who builds this: About. Found something wrong? Tell us and it gets fixed or removed.

Figures on this page last checked against the source documents on 2026-09-09. Codes are amended locally; confirm against the edition your jurisdiction enforces.

Related calculators

Pipe boots and chimney flashing have no code dimensions. R905.2.8.4 sends them to the shingle manufacturer's printed instructions and this page will not invent figures for them. Everything else quoted here is a minimum from R905.2.8, not a recommendation, and the sequence of assembly matters more than any of the dimensions: step flashing goes in course by course with its vertical leg under the siding.