I think one of the hardest things about starting out freelancing or consulting is figuring out how to properly charge for your time. Almost everyone comes in way too low when they're starting out. I used to freelance and I made the same mistake with my first couple of projects.
The reality is that your hourly wage at your full-time job is not anywhere close to a good approximation for what to charge as a consultant/freelancer. In many cases you'll need to aim for at least 2x this rate, maybe even 3x, which seems absurd if you're new to the game.
There's a couple of reasons:
1) At a full time office gig you're paid a salary in exchange for working a fixed(ish) amount of hours per week. While technically you're supposed to be working the whole time you're "at work", I think most people rarely spend their whole day at the office doing actual work. There's tons of filler time spent on activities that don't qualify as actively fulfilling business objectives. But you are paid for all of this time regardless.
As a consultant, you can only bill for time you spend actively doing client work. But in reality you need to spend almost just as much time on non-client work such as finding new projects, marketing yourself, networking, bookkeeping, etc. No one pays you for that, so the rate you charge needs to be able to compensate for that time.
2) As an employee, your salary does not capture the full cost of employing you. In the US, the amount you pay in social security & medicare is matched by your employer, so when you're a freelancer you get to pay 'self-employment tax' where you essentially have to pay the second half yourself. Don't forget health insurance too. There's also the cost of facilities, equipment, and food. Granted, you can deduct a lot of this stuff as business expenses, but it still adds up.