Four faces, four details
Water reaches a chimney from every side, and each face is flashed differently. The downhill face gets an apron, one continuous piece lapped over the shingles below it. The two sides get step flashing: a separate bent piece under every shingle course, so each one sheds onto the next. The uphill face, where water running down the roof hits the brick head-on, gets a back pan turned up against the masonry, or on a wide chimney a cricket. Self-adhered membrane goes under the corners, where those pieces meet and water collects.
All of that is base flashing, fastened to the roof. Over it goes counter flashing, fastened to the chimney. A grinder cuts a narrow slot, called a reglet, into a mortar joint; the top edge of the counter flashing is bent into the slot, wedged and sealed, and the rest hangs down over the base flashing. Up the sides it is cut in steps that follow the brick courses. The chimney sits on its own foundation and the roof framing moves with the house, so the two layers are allowed to slide past each other while the overlap keeps water out.
The estimate prices that assembly in galvanized steel: $42 to $126 of metal, $19 to $32 of membrane and $23 to $32 of polyurethane sealant, which goes into the reglet over the bent edge rather than across an open joint. Steel rather than aluminum, because mortar is alkaline and slowly corrodes aluminum. Copper lasts longer again, at a higher price.
The quick reseal, and how it fails
On many leaking chimneys there is no counter flashing at all, only a bead of caulk or a smear of black roofing cement where the metal meets the brick. It is the fastest repair to sell and it holds for a while. Then the sun hardens it, the chimney and the roof move a fraction differently through the seasons, and the bead peels away from the brick along one edge. Water running down the face of the chimney now goes behind the metal and into the attic.
Recaulking resets that clock and nothing more. A quote to "seal the chimney" for much less than the figure above is usually this, not the repair priced here. Two questions sort it out: is any metal being replaced, and is anything being cut into the mortar? Two noes mean maintenance, with the real repair still ahead of you.
The cricket this price leaves out
A cricket, also called a saddle, is a small peaked roof built on the uphill side of a chimney so that water and snow coming down the slope split around it instead of piling against the brick. The International Residential Code, section R903.2.2, requires one on the ridge side of any chimney more than 30 inches wide.
This estimate does not include a cricket. It assumes a chimney narrow enough for a back pan. A cricket adds framing, sheathing, underlayment, shingles and its own flashing, and it is quoted as a separate line. Measure your chimney across the slope from the roof or from the attic. If it is over 30 inches and has no cricket, ask for that line, because a flat back pan on a wide chimney is exactly where leaves, snow and standing water collect.
Leaks that start in the masonry
Not every wet patch beside a chimney is a flashing failure, and new flashing will not stop the leaks that start higher up. A cracked crown, the cement cap around the flue at the top, lets rain into the masonry. A flue with no cap lets it straight down the inside. Eroded mortar joints and bricks with flaking faces soak up water that travels down inside the chimney and shows up in the attic exactly where a flashing leak would.
A few clues point to the masonry. Water in the firebox or on the hearth usually comes from above the roof, not from the flashing. A leak that appears only after long, soaking rain, rather than in any shower, suggests brick that is saturating. White crusty deposits on the chimney bricks inside the attic mean water has been passing through them. Repointing, a new crown or a flue cap are mason's work and are not in this estimate.
Masonry repairs also come first. The reglet is cut into a mortar joint, and if the joints are soft and sandy, the counter flashing has nothing sound to grip. A roofer who finds that should say so and suggest repointing the base of the chimney before it is reflashed.