Gross Margin & Job-Cost Accounting Guide
Cost of Goods Sold (COGS) formula: inventory math, contractor Cost of Revenue, and QuickBooks GL mapping
Your gross margin is only as accurate as what sits inside Cost of Goods Sold. 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. Here are both exact formulas, worked examples, and the 5000-series 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 Account 1310 (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 (Account 1310). 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 5000-series COGS mapping table: what belongs above vs. below the gross profit line
| GL Account Band | COGS Status | What Belongs Here | Most Common QuickBooks Defect |
|---|---|---|---|
| 5100 - 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 6100 Salaries & Wages with office admin and owners. |
| 5150 - 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 6400 General Business Insurance below the gross profit line. |
| 5200 - Direct Materials COGS | Included in COGS | HVAC units, water heaters, electrical panels, wire, pipe, fittings, and consumables relieved from Inventory (1310) or job-purchased. | Expensing bulk warehouse stock orders directly to 5200 on the purchase date without an ending inventory or Account 1360 staged material adjustment. |
| 5300 - 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 6350 Legal, CPA & Professional Fees or general administrative overhead. |
| 5400 - 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 6300. |
| 6100-6900 - 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. |
How much billing, clearing, or payroll drift is sitting between your field software and QuickBooks?
A green sync status only confirms that an API call ran. It does not confirm that exported invoices, merchant processor deposits, retainage, or job-coded labor actually tie to your General Ledger.
1. Modeled monthly unverified drift scenario
$11,200/mo
Illustrative planning scenario ($350,000 x 3.2% base assumption x 1x cadence factor), not a confirmed loss.
2. Gross 12-month un-reconciled variance volume
$134,400/yr
Gross annual volume of monthly timing, clearing, and job-tag exceptions to trace across 12 closes (while pure timing differences reverse across period cutoffs, un-reconciled clearing and duplicate entries accumulate).
3. Modeled close sign-off timeline
11 to 16 business days
Planning estimate to tie operational exports to General Ledger control accounts.
3 mandatory record checks for ServiceTitan + QuickBooks Online / Intacct:
Close Gate 01
Batch export cutoff vs processor settlement: verify exported invoice batches and payment batches share the same posting window so Account 1160 Undeposited Funds clears within 3 to 5 business days.
Close Gate 02
GreenSky / Synchrony financing merchant buy-down fees: separate 8% to 12% dealer discount fees into contra-revenue financing fee discounts (or financing expense per accounting policy and ASC 606 principal/agent evaluation) so gross AR never stays open after net funding.
Close Gate 03
Deferred membership liability (Account 2420): reconcile recurring membership billings and recognition schedules against completed visits or contractual service periods.
Free Reconciliation Checklists (CSV for Excel & Sheets)
Run the 12-gate field-to-QuickBooks close checklist or record exceptions in the mismatch worksheet.
Direct 15-Minute Triage Call ($0) or $300 Flat-Fee 48-Hour Diagnostic Sprint (100% Credited)
Want us to trace 1 closed month across your operational software and QuickBooks?
Start with a free 15-minute phone triage call to review your calculator numbers and confirm scope. When you are ready for hands-on execution inside your QuickBooks file (Firm ID: 9341456933694243), our paid $300 Flat-Fee 48-Hour Diagnostic Sprint runs the 18-Check Forensic Outlier Scan, installs our 3-Account Clearing Architecture (Accounts 1150, 1160, 1170-1180) and trade Chart of Accounts, and completes one selected 48-hour execution track (reconciling 1 benchmark month, tying out tax-return Retained Earnings, mapping FSM items to GL, or testing 1 subledger/WIP/payroll bridge), credited 100% toward any multi-month catch-up cleanup, sell-side QoE prep, or ongoing monthly bookkeeping, controller, or CFO engagement started within 30 days.
Free 15-min triage · $300 Sprint is 100% credited within 30 days
Frequently asked questions
What is the standard Cost of Goods Sold (COGS) formula?
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 (Account 1310 Inventory Asset).
How is Cost of Goods Sold calculated for a contractor or service business?
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.
Does Cost of Goods Sold include salaries, rent, or marketing?
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 (Accounts 5000-5990).
Why does putting field technician payroll in Overhead instead of COGS break financial statements?
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.
How do I fix misclassified COGS and Inventory in QuickBooks Online?
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.