Your Shopify client sold $48,000 worth of products last quarter. But what actually hit cost of goods sold? Probably not what they think.
Freight sitting in operating expenses, inventory write-offs buried in miscellaneous, service labor never classified. COGS errors are quiet. They don't trigger a reconciling difference. They just compress gross margin and make P&L comparisons useless.
Here's how COGS works and where bookkeepers get it wrong.
What is cost of goods sold (COGS)?
Cost of goods sold is the direct cost of the products or services a business sold during a specific period. It sits above the gross profit line on the income statement. For product businesses, the standard formula is: Beginning Inventory + Purchases - Ending Inventory = COGS. If your client started the quarter with $12,000 in inventory, bought $30,000 more, and ended with $9,000 on hand, their COGS is $33,000. That $33,000 reduces revenue to arrive at gross profit. Everything below gross profit (rent, payroll, software) is an operating expense, not COGS.
Key Takeaways
- COGS is above-the-line - it directly reduces revenue to produce gross profit, so miscoding one transaction can skew margin reporting across every period
- The formula is straightforward - Beginning Inventory + Purchases - Ending Inventory = COGS; the math is simple, the classification decisions are not
- Freight-in belongs in COGS - shipping costs to receive inventory are a cost of acquiring goods, not an operating expense; most clients code them wrong by default
- Service businesses have COGS too - direct labor hours billed to a client and materials consumed on a job are COGS, not payroll expense or supplies
- Perpetual systems track COGS in real time - QBO and Xero use perpetual inventory by default for inventory items; periodic requires a manual adjustment at period end
- Inventory write-offs hit COGS - when unsellable stock is written off, the credit goes to inventory and the debit goes to COGS (or a COGS sub-account), not miscellaneous expense
What COGS Actually Is
COGS captures only the costs tied to goods or services actually sold during the period. Inventory still on hand stays on the balance sheet. General overhead stays in operating expenses.
That above-the-line position matters. Gross margin is one of the first metrics a lender or investor looks at. A product business with 60% gross margin looks very different from one at 40%. If bookkeepers mix operating costs into COGS, or leave COGS items in operating expense, the margin signal breaks.
For a full walkthrough of where COGS fits on the income statement, including how gross profit flows into operating income, that article covers the complete P&L structure.
The COGS Formula
The standard formula for product businesses:
Beginning Inventory + Purchases - Ending Inventory = COGS
Worked example. Your client sells kitchen supplies:
- Beginning inventory (January 1): $12,000
- Purchases during the quarter: $30,000
- Ending inventory (March 31): $9,000
- COGS = $12,000 + $30,000 - $9,000 = $33,000
That $33,000 appears on the income statement. The $9,000 stays on the balance sheet as a current asset.
Purchases in this formula include everything required to get inventory into saleable condition: the product cost itself, freight-in, import duties, and direct handling fees. If your client paid $1,200 in shipping to receive that inventory, it belongs in the $30,000 purchases figure, not in a shipping expense account.
Periodic vs Perpetual Inventory
Periodic inventory calculates COGS at the end of each accounting period using a physical count. The business doesn't track inventory movement transaction by transaction. Smaller retailers and businesses without point-of-sale systems often run periodic. As a bookkeeper, you'll record a period-end journal entry to adjust inventory and recognize COGS.
Perpetual inventory updates COGS with each sale. QBO and Xero default to perpetual for any item type set up as "inventory." Proper item setup matters here: if a client creates a product as a non-inventory or service item, the system won't track cost at sale, and COGS never gets hit. For businesses running perpetual inventory, the bookkeeping task shifts to reviewing cost basis on each item and catching timing errors when vendors invoice late.
COGS for Service Businesses
No inventory doesn't mean no COGS. Direct costs tied to delivering a specific project belong above the gross profit line:
- Developer hours billed to a client project
- Subcontractor fees for a job
- Materials consumed on a construction site
- Software licenses bought for a specific engagement
A marketing agency paying a freelancer $3,000 to execute a client campaign has $3,000 in COGS. If that $3,000 gets coded to "Subcontractor Expense" in operating costs instead, gross margin is overstated.
The test: "Would this cost exist without this specific client?" Yes = COGS. No = operating expense.
Common Gotchas
Freight-in coded to shipping expense. The most common one. Inbound freight is part of the cost of acquiring inventory. It belongs in purchases (flowing through the COGS formula) or a COGS freight sub-account. Many clients default every shipping invoice to "Shipping & Postage" in operating expenses. That understates COGS and inflates gross margin.
Inventory write-offs misclassified. When product becomes unsellable, the correct entry is: credit inventory, debit COGS (or a "Inventory Shrinkage" sub-account). Many clients debit "Miscellaneous Expense" instead, leaving dead inventory on the balance sheet and dropping an unrelated hit on operating expenses.
Service labor coded to payroll expense. For businesses where staff time drives direct revenue, some payroll belongs in COGS. Without that split, a staffing agency or consulting firm can't see actual gross margin on billable work.
Returns not netting against COGS. When customers return product, the reversal flows back through inventory and COGS, not just a revenue credit. Letting returns sit uncategorized distorts both the revenue line and inventory balance.
How Growthy Handles COGS Categorization
COGS errors come down to the same patterns: freight coded wrong, vendor bill line items defaulting to operating expense, service labor never split out. Growthy categorizes transactions automatically and learns each client's patterns.
Move a freight invoice to COGS on one client. Growthy picks up that pattern. Future freight from the same vendor gets suggested in the right category. You review and approve, not re-classify from scratch. On first import, categorization runs at 85% accuracy. After 30 days on returning books, it's 90%+.
Alpha access is $99/mo with a 2-year lock-in for the first group of firms. Join the waitlist at Growthy.
Frequently Asked Questions
What is cost of goods sold in simple terms?
COGS is the direct cost of the products or services you actually sold during a period. If you sold 100 units that cost you $10 each to produce, your COGS is $1,000. It doesn't include overhead like rent or software. Only direct costs tied to the goods or services delivered.
What's the difference between COGS and operating expenses?
COGS sits above gross profit and covers direct production or delivery costs. Operating expenses sit below gross profit and cover business overhead: rent, utilities, admin payroll, marketing. Misclassifying between the two doesn't change net income, but it distorts gross margin.
Does a service business have COGS?
Yes. Direct labor billed to client projects, subcontractors, and materials consumed on specific jobs are COGS. The test: would this cost exist without this specific client? If yes, it's COGS. General overhead stays in operating expenses.
What happens if I expense freight-in instead of capitalizing it in COGS?
Gross margin gets overstated. You're recognizing a cost of acquiring inventory as an operating expense. The error compounds if the same vendor gets coded wrong every period. Fix: reclassify freight to a COGS account or include it in the purchases figure.
See double-entry bookkeeping fundamentals for how COGS flows through debits and credits. For all glossary terms, visit the Growthy glossary.