Gross margin calculator for contractors

Enter your revenue and direct job costs to get your gross margin percentage in seconds. Below the calculator you will find the formula, a trade-by-trade cost breakdown, and how to move from a monthly spreadsheet rebuild to a live margin board.

By Datacube content engineAutogeneratedJune 24, 2026

Calculator

What this calculator does and when to use it

Gross margin tells you how many cents you keep from every revenue dollar after paying for the work itself. This gross margin calculator for contractors takes two numbers, your revenue and your direct job costs, and returns the gross profit dollars and the gross margin percentage. Use it for a quick month-end check, a department snapshot, or a technician-level job review. The math works the same whether you run HVAC, plumbing, electrical, or roofing. The catch is the same one operators hit every month: a one-time calculation gives you a number for one period. By the time you pull the report, close the spreadsheet, and send it to the team, three weeks of the next month are already spent at the same margin you just found out about.

Calculate your gross margin

Use revenue and COGS from the same closed period. Direct job costs include field labor, materials, parts, subcontractors, and job-specific equipment. Do not include office staff, rent, marketing, or administrative overhead.

Gross margin

45.0%

Gross margin = (revenue minus COGS) divided by revenue, expressed as a percentage. At the sample inputs, $600,000 revenue minus $330,000 in direct costs leaves $270,000 gross profit, which is a 45% gross margin. Gross profit dollars = revenue minus COGS.

Figures are illustrative. Gross margin targets vary by trade, season, market, job mix, labor market, and business model. This calculator does not constitute accounting or financial advice.

Formula

Gross margin (%) = (revenue – COGS) ÷ revenue × 100

Subtract your direct job costs from revenue to get gross profit, then divide by revenue and multiply by 100. Example: $600,000 revenue minus $330,000 COGS is $270,000 gross profit. Divide by $600,000 and multiply by 100: 45% gross margin. COGS in home services means field labor (wages and burden), materials, parts, subcontractors, and job-specific equipment. It does not include rent, office staff, marketing spend, or vehicle depreciation. Those belong below the gross profit line.

Gross profit (dollars) and gross margin (percentage) measure the same thing in different units. Both use the same COGS boundary. The KPI dictionary entry at /kpis/gross-margin walks through benchmarks, department ranges, and how the figure connects to net operating income.

Direct job costs by trade: what goes into COGS

TradeBiggest COGS driverSecondary COGS driverOften misclassified as COGS
HVAC installEquipment and materials (40–55% of job revenue)Field labor and burdenWarehouse overhead, delivery vehicles
Plumbing serviceField labor and burden (often 50–60% of job costs)Parts and materialsDispatcher wages, office coordinator
Electrical serviceField labor and burdenMaterials (wire, panels, fixtures)Permit fees, admin time on permits
RoofingMaterials (shingles, decking, underlayment)Subcontractors (tear-off crews)Sales commissions, estimator time
Garage doorParts and doors (high material cost per job)Field labor (usually lower hours per job)Truck maintenance, fuel allocated to jobs

Warning

Common mistake: including overhead in COGS

Office rent, marketing spend, dispatcher salaries, admin staff, and vehicle depreciation are operating expenses, not COGS. Putting them above the gross profit line inflates your apparent cost of delivery and makes your gross margin look worse than it is. Worse, it hides which expenses are variable (they move with job volume) and which are fixed (they do not). Keep the COGS line clean: field labor, materials, subcontractors, and job-specific equipment only. If you are pulling numbers from QuickBooks, verify that your chart of accounts separates these correctly before you calculate.

Reading your gross margin result

These signals are directional, not universal benchmarks. What good looks like depends on your trade, job mix, market, and labor structure. Compare against your own trend first.

  • Gross margin holding steady or climbing month over monthYour pricing is absorbing labor and material cost changes. No immediate pricing or cost action required.
    Good
    Current
    Target
  • Gross margin dropped 3 or more percentage points vs. same period last yearMaterial cost increases, labor burden changes, or more low-margin jobs in the mix. Investigate job type before changing price.
    Watch
    Current
    Target
  • Revenue up, gross margin down in same periodUsually discounting to close volume or taking on larger, lower-margin installs. Compare margin by job type before assuming a cost problem.
    Watch
    Current
    Target
  • Gross margin volatile month to month with no seasonal explanationOften signals inconsistent COGS classification, open invoices being counted too early, or a job-mix shift that needs segmenting by department or tech.
    Poor
    Current
    Target
  • Gross margin rising while completed jobs and technician count fallMay mean you are shedding lower-margin work intentionally or losing volume unintentionally. Pair with job count and booking rate before celebrating.
    Watch
    Current
    Target

Info

Owner takeaway: gross margin is a field problem before it is a finance problem

Your accounting team sees the gross margin number after the month closes. But the decisions that move it happen in the field, every day: a tech discounts a repair to close, a job runs over on labor, a material purchase goes unbilled. By the time QuickBooks reconciles and the report lands, that margin is already locked. Operators who track gross margin live, with CRM and accounting data connected, can see a department's margin shifting in week two and coach before the month is over. That is the difference between a financial report and an operating lever.

What to do with the number you just calculated

  1. 01

    Verify your COGS boundary

    Before acting on the result, confirm your direct cost number includes only field labor, materials, parts, subcontractors, and job-specific equipment. Pull it from your accounting system, not your CRM, and confirm your chart of accounts separates COGS from operating expenses.

  2. 02

    Segment by department and by technician

    Run the calculation once per department and once per technician for the same period. A company-wide 45% margin can hide one department running at 30% while another runs at 58%. The department that is dragging your number down is where the coaching conversation belongs.

  3. 03

    Compare the current period to the same period last year

    Seasonality changes job mix and labor efficiency. A March gross margin compared to March last year is more actionable than March compared to December. If your margin is down year over year with similar job count, look at labor burden, material cost, and whether discounting has crept up.

  4. 04

    Identify the lever that is actually moving

    Gross margin can drop for three reasons: prices are too low, direct costs are too high, or your job mix shifted toward lower-margin work. Each fix is different. Lower prices need a pricing or upsell conversation. Higher costs need a vendor or labor-efficiency review. A mix shift may not need fixing at all if the volume compensates.

  5. 05

    Move from monthly calculation to live tracking

    Once you are checking gross margin every month, the spreadsheet stops keeping up. Connect your CRM (ServiceTitan, Housecall Pro, or Workiz) and QuickBooks to a live financial dashboard so gross margin by department updates through the month instead of appearing once it is too late to act.

Related resource

Track gross margin alongside your other profit KPIs

Gross margin is one line on a complete financial operating board. The job profitability calculator pairs it with revenue per technician and cost per booked job so you see margin from three angles at once.

  • Gross margin by department, technician, and location
  • Revenue per technician and job-level profitability
  • Cost per booked job and marketing ROI side by side
  • QuickBooks financial data connected alongside CRM job data
Resource

Gross margin calculator FAQ

Stop finding out your gross margin after the month is already gone

A calculator gives you a number for one closed period. Datacube connects your QuickBooks and CRM data so gross margin by department is live on the board, updated as jobs close and invoices post. Spot a margin problem in week two, not on the last day of the month.