Gross Margin & Job-Cost Accounting Guide
Cost of Goods Sold (COGS) formula: contractor Cost of Revenue and QuickBooks GL guide
Your gross margin is only as accurate as what sits inside Cost of Goods Sold. Here are both exact formulas (retail/inventory COGS vs. contractor Cost of Revenue), two worked examples, and the QuickBooks Chart of Accounts mapping.
Formula 1: Inventory & E-Commerce Businesses
COGS = Beginning Inventory + Purchases + Freight-In - Ending Inventory
Used by retail, wholesale, e-commerce, and supply-house operations where physical goods are purchased, held in Inventory Asset, and relieved only when sold.
Formula 2: Contractors & Field-Service Businesses
Cost of Revenue = Burdened Field Labor + Materials Used + Subs + Job Equipment/Permits
Used by HVAC, plumbing, electrical, roofing, GC, and commercial cleaning firms where skilled field labor (47.7% median gross margin in Level's n=2,242 dataset) is the primary direct cost.
Two worked COGS examples: inventory vs. contractor Cost of Revenue
Example A: Warehouse & Truck-Stock Inventory COGS
An electrical and lighting distributor starts Q2 with $140,000 of counted warehouse stock. During Q2, it buys $310,000 of panels and fixtures and pays $12,000 of inbound freight. A physical count on June 30 shows $165,000 of unsold inventory remaining on the shelves:
- Beginning Inventory (Apr 1): $140,000
- + Q2 Inventory Purchases: +$310,000
- + Inbound Freight & Duties: +$12,000
- = Goods Available for Sale: $462,000
- - Ending Inventory (Jun 30): -$165,000
- = Q2 Cost of Goods Sold: $297,000
If the bookkeeper had expensed all $322,000 of Q2 purchases directly to COGS without adjusting for the $25,000 inventory build, Q2 gross profit would be understated by $25,000.
Example B: $3.2M Commercial & Residential Plumbing Contractor
A plumbing contractor bills $3,200,000 in annual revenue across service calls, water heater replacements, and commercial tenant buildouts. Here is how true Cost of Revenue and Gross Profit compute when field payroll is properly mapped to the 5100 series:
- Direct Field Labor (5100): $820,000
- + Field Payroll Taxes & Fringe Burden (5150): +$188,600
- + Direct Materials COGS (5200): +$640,000
- + Excavation & Concrete Subs (5300): +$145,000
- + Permits & Mini-Excavator Rentals (5400): +$46,400
- = Total Cost of Revenue (COGS): $1,840,000 (57.5%)
- = True Gross Profit: $1,360,000 (42.5% Gross Margin)
If the $1,008,600 of burdened field labor were left in 6100 Overhead, QuickBooks would display a fake 74.0% gross margin while making every service call look wildly profitable.
QuickBooks COGS Mapping Table: What belongs above vs. below the gross profit line
Across 1,275 accounting and bookkeeping job postings we analyzed, 316 listings (24.8%) sought payroll and labor-burden allocation, 244 listings (19.1%) sought contractor job-costing and WIP setup (including 161 [12.6%] direct job-cost COGS allocation listings and 83 [6.5%] WIP/retainage schedules), and 152 listings (11.9%) sought ecommerce/inventory COGS, landed cost, and 3PL clearing.
| GL Account Band | COGS Status | What Belongs Here | Most Common QuickBooks Defect |
|---|---|---|---|
| Direct Field Labor | Included in COGS | W-2 hourly wages, overtime, and piece-rate pay for technicians, installers, apprentices, and working foremen on billable jobs. | Lumping field technician payroll into general Salaries & Wages with office admin and owners. |
| Field Payroll Taxes & Fringe Burden | Included in COGS | Employer payroll taxes (7.65% FICA + unemployment), trade-code Workers' Comp insurance, and field health/bona fide fringe benefits. | Booking all Workers' Comp insurance to General Business Insurance below the gross profit line. |
| Direct Materials COGS | Included in COGS | HVAC units, water heaters, electrical panels, wire, pipe, fittings, and consumables relieved from Inventory or job-purchased. | Expensing bulk warehouse stock orders directly to COGS on the purchase date without an ending inventory or staged material adjustment. |
| Subcontractors & Outside Trade Labor | Included in COGS | 1099 or corporate specialty subcontractors (crane lifts, trenching, drywall patch, electrical sub-trades) tied to a customer job. | Coding subcontractor bills to Legal, CPA & Professional Fees or general administrative overhead. |
| Job Permits, Rental Equipment & Dumpster Fees | Included in COGS | Municipal building permits, scissor-lift/excavator rentals, and disposal fees incurred for specific customer projects. | Mixing project equipment rentals with shop lease or office equipment in Rent & Occupancy. |
| Office Admin, Fleet Overhead, Rent & Marketing | Excluded from COGS (SG&A) | CSRs, dispatchers, office rent, SaaS subscriptions, Google LSA/meta ads, accounting fees, and general liability insurance. | Pushing general marketing or office salaries into COGS, which makes job-cost gross margins unusable for bidding. |
Free 1-Click QuickBooks Chart of Accounts CSV Templates
Instant download · No email requiredFastest Start · 100% Credited Toward Ongoing Service
Start with the $300 Flat-Fee 48-Hour QuickBooks Fix Sprint
We audit your ledger, install clean clearing bridges for your software stack, reconcile 1 full month as live proof, and give you an exact catch-up or monthly quote.
Frequently asked questions
The standard inventory Cost of Goods Sold formula is: Beginning Inventory + Purchases During the Period + Freight-In and Direct Production Labor minus Ending Inventory = Cost of Goods Sold. This formula measures the direct cost of physical inventory actually sold during the reporting period, excluding unsold stock still sitting in your warehouse or service trucks.
Contractors and field-service companies use an expanded Cost of Revenue (Direct Job Cost) formula: Direct Field Labor (5100) + Field Payroll Taxes & Fringe Burden (5150) + Direct Materials COGS (5200) + Subcontractors (5300) + Job-Specific Equipment Rentals and Permits (5400) = Total Cost of Goods Sold.
No. Office salaries, dispatcher wages, salesperson commissions (unless strictly tied to job-cost policy), warehouse or office rent, software subscriptions, and marketing belong in Operating Overhead (SG&A, Accounts 6000-6990). Only labor and materials directly required to execute and deliver the customer job belong in COGS.
In Level's contractor benchmark study (published on Level and our affiliated benchmark publication, Trade Economy Index, covering 2,242 contractors and $13.25B of job revenue), direct field labor carries a 47.7% median gross margin and represents the largest single direct cost in service trades. Leaving field wages in the 6000-series overhead accounts makes gross margin look artificially high (often 70% to 85%) while hiding unprofitable service lines, underpriced maintenance agreements, and crew hour overruns.
Separate field wages (5100) and field payroll burden (5150) from office salaries (6100) and unbilled shop/windshield time (6150) in your payroll mapping, route warehouse bulk purchases through Inventory Asset (1310) or staged job materials (1360), and map every ServiceTitan, BuildOps, Housecall Pro, or Jobber pricebook item to a 5000-series COGS account. Level's $300 Flat-Fee 48-Hour QuickBooks Diagnostic Sprint (credited 100% within 30 days) audits your COGS mapping and completes one selected 48-hour fix track.
Grow without losing control of the numbers
Drop your info and we’ll show your real margin across jobs, crews, products, and customers, where profit leaks to rework or hidden costs, and how much cash is sitting in unbilled work or inventory.
No commitment. Real numbers, not generic advice.