I generally believe that stating your hourly rate and providing frequent updates and milestones is a much better practice than giving an up-front project cost. Software dev is a very difficult task to estimate. Giving an up-front project cost is either pushing uncompensated risk onto the developer, or overcharging the customer for hours of work that may not occur, depending on how tough the project turns out to be on…
This is in many ways _harder_, though. Hard to estimate time required (supply-side), hard to estimate value to customer (demand-side).
As a service provider, "overcharging the customer for hours of work that may not occur" is effectively sidestepped by project-based billing. You're providing a product of value to them, not a number of hours of labor. Hourly rates are best left as an internal estimator of cost-to-supply-the-thing, and nothing else.