Many things change your final cost. The size of your roof matters a lot. Removing your old roof adds to the price. A roof with a complex shape can also cost more. The type of shingles you pick also plays a part.
It is smart to plan ahead. Get quotes from a few local roofers. Ask them about the materials they use. Make sure they include permits in their price. This helps you understand the full job.