Jason Blumer gives a few reasons as to why charging by the hour doesn’t work, but his first makes so much sense, it maddens me that I ever billed hourly:
When you charge by the hour, you and your client begin your relationship with diametrically opposed desires. You want to bill more hours, they want you to bill fewer hours. That is a sucky place to start a relationship.
This post is from 2012, but it’s just as applicable now. Something I’ve been doing recently is to give clients my daily or weekly rate for smaller tasks. I then use those rates to calculate how I should price their bigger projects. This way, nothing is tied to the hours I dedicate to something, and our interests are better aligned.