How to Calculate Project Margins for Hourly, Fixed-Price, and Retainer Work
You're billing clients, invoices are going out, and the work feels steady. But are you actually making money? The gap between revenue and profit is where most freelancers and agencies slip. Calculating project margins reveals what your work is truly worth after costs, and it's the number that matters far more than the hourly rate on your invoice.
Why project margins matter more than billable hours
Revenue looks impressive on paper. A $50,000 project feels substantial. But if that project cost you $45,000 in direct and indirect expenses, you've just earned a 10% margin—roughly $5,000 for weeks or months of work. Most service professionals never calculate this, so they don't see the erosion happening in real time.
The disconnect happens because we're trained to think in hourly rates and project fees. We hit our billable hour targets or deliver the contract scope, and we assume profitability follows. It doesn't. Invisible costs—unbilled email chains, revision rounds beyond scope, admin overhead, tool licenses tied to the project—quietly compress what looked like good revenue into thin, unsustainable margins.
This matters because margin is the only number that tells you whether your business model actually works. Time tracking by project and category is one practical way to catch these hidden costs, but first you need to understand how to measure them.
The basic margin formula (and what counts as a cost)
Project margin is simple math:
(Revenue − Costs) / Revenue × 100 = Margin %
A $10,000 project that costs $7,000 to deliver has a 30% margin: ($10,000 − $7,000) / $10,000 × 100 = 30%.
The tricky part is knowing what to include in "costs." Direct costs are straightforward: software licenses bought for the project, contractor fees, tools, or assets purchased specifically for that work. Indirect costs are harder to see but equally real: time spent in kickoff calls, email back-and-forth, revisions, scope clarification, and administrative overhead tied to client management.
What you don't include: your own salary or draw. That comes from margin. If you pay yourself $60,000 a year, that's funded by margin across all your projects. Don't double-count it as a cost on individual projects.
Calculating margins for hourly projects
Hourly work feels safer because you bill for time. But it's also where unbilled time hides most effectively.
The formula is straightforward:
(Billed hours × rate − all project costs) / (Billed hours × rate) × 100
Here's the real-world version: You bill a client at $100/hour. The project runs 80 billed hours, so revenue is $8,000. But you also spent:
- 15 hours in meetings and discovery (included in the scope, billed)
- 8 hours on email and revisions not in the original estimate (unbilled—margin killer)
- $400 in software tools for the project
So your true cost is (88 unbilled/billed hours × your internal cost per hour) + $400. If your internal cost per hour is $50 (covering your salary, taxes, overhead), that's (88 × $50) + $400 = $4,800 in costs. Your margin becomes ($8,000 − $4,800) / $8,000 = 40%.
The blind spot: communication time. Emails, Slack conversations, status updates, and revision requests that fall outside the original scope add up fast. Most freelancers don't track these, so they don't realize they're working for much less than their hourly rate on that specific project.
Calculating margins for fixed-price projects
Fixed-price projects are high-stakes for margin because scope creep goes straight to profit.
The formula:
(Fixed fee − [total hours worked × internal cost per hour] − direct costs) / Fixed fee × 100

You quote a client $15,000 for a web redesign. You estimate it'll take 150 hours of your time (at a $50/hour internal cost) plus $2,000 in design tools and hosting setup. Your estimated margin is ($15,000 − [150 × $50] − $2,000) / $15,000 = ($15,000 − $7,500 − $2,000) / $15,000 = 33%.
But then the client asks for three rounds of revisions instead of two, requests design changes mid-project, and takes two weeks to provide feedback. You end up working 185 hours. Your actual margin drops to ($15,000 − [185 × $50] − $2,000) / $15,000 = 13%.
This is why scope management is a profitability issue, not just a scheduling one. Every unplanned hour erodes margin on fixed-price work. Track whether a fixed project was actually profitable by comparing estimated hours (from your quote) to actual hours (from your time logs).
Calculating margins for retainer work
Retainers feel stable because the revenue is predictable. But they can quietly erode margin if you're not watching carefully.
The formula:
(Monthly retainer fee − monthly costs − [hours over cap × opportunity cost]) / Monthly retainer fee × 100
You have a client on a $4,000/month retainer for 40 hours of work. Your internal cost per hour is $50, so the monthly cost is $2,000. Your baseline margin is ($4,000 − $2,000) / $4,000 = 50%.
But here's the trap: you work 48 hours that month. The extra 8 hours push you over capacity. Those 8 hours at $50/hour = $400 in opportunity cost (work you could've billed elsewhere). Your real margin becomes ($4,000 − $2,000 − $400) / $4,000 = 40%.
Many freelancers treat unused retainer hours as "mine to keep"—pure profit. They're not. If a client is paying for 40 hours and you only work 30, you have 10 hours of unused capacity. That's either margin (great) or time you could've allocated to another client (opportunity cost if you're at capacity). The moment you exceed the cap, you're working for free unless you can bill that time elsewhere.
What's a healthy margin target?
Service businesses typically operate on 15–30% net margin. Solo freelancers often aim for the higher end (25–35%) because they have fewer economies of scale. Agencies with teams can run leaner (15–25%) if they have good utilization and overhead control.
Below 10% and you're working for very little. You're not building profit to reinvest in your business, you're one sick week away from a cash crisis, and you have no cushion for slow months or rate drops.
It's also worth understanding markup vs. margin. If you mark up a project by 50% (charge $150 for work that costs $100), your margin is only 33% ([$150 − $100] / $150). Higher markup doesn't always mean healthy margin—the calculation matters.
How to track the invisible costs eating your margin
A focus timer built for tracking client work is one of the most practical tools for this. When you tag time by project and category—meetings, revisions, admin, deep work—you stop guessing where your hours actually go. Over a month of data, patterns emerge. You'll see which clients generate invisible overhead, which project types consistently go over estimate, and where your margin is being silently eroded.
Build a simple margin tracker in a spreadsheet or your invoicing tool. At the end of each month (or after closing each project), compare estimated costs and hours to actual. Ask yourself:
- Did this project take longer than I quoted?
- Which cost categories surprised me?
- Did scope creep happen, and where?
- What would I change about my estimate if I quoted this again?
This isn't about judgment—it's about pattern recognition. After three months of tracking, you'll see which types of work generate healthy margins and which consistently underperform. That's when you can make real decisions: raise rates on margin-thin work, tighten scope definitions, or say no to projects that don't hit your margin threshold.
Ready to put this into practice? See exactly where your focus goes, by client.
Track focus by client →Conclusion
Project margins are where your business health lives. Revenue is vanity; margin is reality. Whether you work hourly, fixed-price, or retainer, the same principle applies: costs are invisible until you measure them, and hidden costs compress profit faster than you'd expect. Unbilled time, scope creep, and admin overhead are the three biggest margin killers across all billing models.
Start with one project this month. Calculate its actual margin using the formulas above. Compare it to what you expected. That number—and the gap between expectation and reality—is the insight that changes how you price and manage work going forward. Margin isn't a vanity metric. It's the proof that your business actually works.
Focus on what matters, by client
Free, no signup. Time your work and see exactly where it went.
Start focusing