The sweet spot for freelancing comes down to providing expertise companies don’t have in-house and can’t easily hire for. That can describe a lot of things. In my case it describes cloud infrastructure and difficult software bugs. In my experience most programmers working full-time jobs have poor debugging skills and limited expertise outside of their domain. Someone who has specialized in mastering, for example, Ruby on Rails likely can’t figure out a SQL database performance problem or how to set up a secure hosting infrastructure. You just have to figure things out quickly and solve problems.
You can’t look at it in terms of cost per hour. The correct way to value yourself its to determine cost or value to the business. That’s summed up in the old joke about the consultant who fixes a broken machine in a few minutes and bills $10,001 dollars — one dollar for pushing a button and $10,000 for knowing which button to push.