Several things affect the total cost. The type of water heater you choose matters. Labor costs for installation also play a part. Removing your old unit adds to the job. Any needed permits can also change the price.
To plan your budget, get quotes from local pros. Discuss your home's hot water needs. This helps you pick the right size unit. Always ask about all parts of the job.