Short answer: yes, in almost every case the flashing should be replaced when you replace a roof. It doesn't happen all of the time depending on the type of roofing company you're working with. Doing the new shingles over old (Layover) with worn flashing is one of the fastest ways to end up with leaks on a roof that otherwise looks brand new from the ground.
There are a few narrow exceptions, and we will get to those. But if you are budgeting for a new roof, plan on new flashing too. Here is everything you need to know before you sign a contract.

Flashing is the metal that seals the weak spots on your roof. Shingles do a great job on the open flat parts but the trouble starts wherever the roof meets something else.
Flashing covers those joints and pushes water back onto the shingles instead of letting it sneak underneath. You will find it in spots like:
Without it, water finds its way in ruining basically everything in it's path over a long enough period. Flashing is one of the most important parts of any roof, even though most people never notice it.
Not all flashing looks the same, and your roof probably has more than one kind. Knowing the names helps you read an estimate and ask better questions.
(See the image above for what Step Flashing looks like)
Step flashing tucks under each shingle along a wall, layered piece by piece so water steps down and away. Apron flashing sits at the base of a wall or penetration in an L-shape. Both are common and both wear out over time.

Valley flashing runs down the channels where two slopes meet, and those valleys carry a lot of water. Counter flashing on the other hand sits over step flashing on chimneys, often cut right into the mortar joint. It is the visible metal you can spot from the ground.
Here is the thing: flashing can sometimes outlast the shingles around it. Copper and well-installed steel can last decades so there really is cases where reusing it makes sense.
Flashing might be reused when:
That said, reusing flashing is the exception not the plan you should follow to cut costs. Once shingles are torn off, a lot of flashing gets damaged in the process anyway. Not to mention pulling old step flashing out of a wall without bending it is tough, and bent metal does not seal right.
Replacement is the right call far more often.
Plan on new flashing when:
Switching materials is a big one. If you go from three-tab shingles to a heavier architectural shingle, or to metal, the old flashing usually will not fit the new system right. New roof, new flashing.
Now, let's talk about something the brochures skip. Flashing is one of the first things a cheap bid quietly drops to lower the price.
Metal costs money, and labor to install it correctly takes time; so a low estimate sometimes means the crew plans to reuse worn flashing or just caulk over the old stuff. That patch job looks fine on day one and fails by the second hard rain which basically warrants the flashing to be replaced this time not saving you any money in the long run.
When you compare quotes from more than one roofing company, look for the word "flashing" in writing. If one bid is hundreds of dollars cheaper, this is often where the difference hides. A good estimate spells out what gets replaced and what gets reused with no guessing.
Of course, none of this comes free. The good news is that flashing is a smaller line item compared to the rest of a roof replacement.
Rough ranges to plan around:
Prices swing based on the metal you pick, how many penetrations your roof has, and how steep it is. Copper costs more than aluminum or steel, but it also lasts the longest.
These are broad numbers. Your roof, your region, and current material prices all move the figure.
Flashing rarely changes your timeline by much. On most homes, a full roof replacement runs one to three days, and flashing work folds right into that.
The exception is heavy custom metal work, like a large copper chimney saddle. That can add a few hours of careful labor. Hand-formed flashing is slower than the pre-bent stuff, but it seals better on tricky spots.
If your roof has lots of dormers, chimneys, and valleys, expect the crew to spend more time on detail work. Those areas are where leaks start, so it is time well spent.
Here is a detail that catches owners off guard. Many areas require a permit for a roof replacement, and that means an inspection. Inspectors do look at flashing.
If old flashing does not meet current code, you may be required to replace it even if it looks okay to you. Codes also change over time, so what passed twenty years ago may not pass today. This is one reason a quick caulk-over rarely holds up.
Material delays can also pop up, especially for copper or custom-bent pieces. If you want a specialty metal, ask your roofing company to order it early so it does not stall the whole job.
You usually get a choice here, and it comes down to budget and looks.
For a standard shingle roof, galvanized steel handles the job for decades. If you are investing in a premium roof and want the upgrade, copper is worth a look. Match the metal to the roof you are building, not the other way around.
In nearly every roof replacement, the flashing should be replaced along with the shingles. Reusing it only makes sense when the metal is rust-free, correctly installed, and you are keeping the same roofing material.
Skipping flashing is a classic way to shave a quote, and it leads to leaks on a roof that should have years of life left. So treat new flashing as part of the job, get it in writing, and choose a metal that fits your home and budget. Do that, and your new roof seals out water everywhere it counts.