As a software freelancer/consultant, I don’t sell my time, but my experience, my knowledge, and quality delivered solutions.
The current industry standard follows measuring and billing work by spent hours, which is really screwed up.
Hourly billing has more disadvantages than anything else — forces every side to deformed attitude. You are simply selling your time, no motivation to do stuff better, faster, to optimize your work, to analyze/think about other approaches (shortcuts), to be better craftsman ==> be more productive. And customers will have a tendency to question your work, to tell you how to do your job, “why did it take so much time”, “why did you take approach x over y”, etc. Customers will treat you as labor, but we are experts in our industry and should behave and sell our skills accordingly.
Consultants try to maximize the hours billed, whereas customers try to minimize the hours billed. Consultants are punished for being more productive and for delivering higher value to the customer. (source)
And moreover, your income is scoped forever, you are able to only increase your hourly rate, but you have to still work for the same amount of time. You cannot make one month 2x more money to have next one vacation with family, or to do self-study, or to work on open-source projects, or whatever.
How to bill your freelance work
The value-based model is hard and as always it is not a silver bullet for every situation. There are plenty of other approaches. For example, I’ve successfully applied a model based on scope agreement that is split into milestones with a fixed price. Every milestone should be relatively small, only milestones with at least 80% of confidence of unknowns should be estimated and priced. The quotes contain a decent buffer to cover unexpected things, to cover communication with customers (emails, calls, etc). For milestones with unknowns, I do pre-analysis and quick research. The customer has to pay at least 50% in advance of any milestone and proceeding with the next milestone only happens after fully paid previous one. Of course, you should be a recognizable and reputable person. Public portfolio, open-source projects are a must.
But there is a lot of other possibilities. For example, a group of developers could do projects based on the scrum with fixed two weeks scopes (as it mostly does anyway), so it is straightforward to estimate and put a price on agreed stories. It will definitely bring much more work on planning, to get requirements right, to have correctly scoped tasks, etc. Also, it forces the team to really deliver the agreed scope. It brings well-based incentives, which is quite positive to everybody, isn’t it?