Cost of goods sold is the direct cost of the products you sold during a period. Subtract it from revenue and you get gross profit, the number that tells you whether your pricing works before overhead is even considered. If COGS is wrong, gross margin is wrong, and every pricing and purchasing decision built on it inherits the error.
The calculation itself is simple. Getting the inputs right is where most small businesses slip.
The formula, with a worked example
Cost of goods sold = beginning inventory + purchases − ending inventory. The logic: everything you had at the start plus everything you bought is what was available to sell. Whatever is still on the shelf at the end was not sold, so the difference is what went out the door.
Example: a shop starts the quarter with $40,000 of inventory at cost, buys $65,000 more during the quarter, and counts $38,000 on hand at the end. COGS is $40,000 + $65,000 − $38,000 = $67,000. If quarterly revenue was $120,000, gross profit is $53,000 and gross margin is about 44%.
This is the same structure as Part III of Schedule C, where sole proprietors and single-member LLCs report COGS: beginning inventory, purchases, cost of labor, materials and supplies, other costs, and ending inventory. A business that tracks these numbers monthly has its tax-time COGS largely done.
What belongs in inventory cost, and what does not
Inventory cost is what it took to get the product into sellable condition and location: the purchase price, inbound freight, and import duties, and for businesses that make things, raw materials and the direct labor of production. Supplier discounts and returns to vendors reduce it.
Marketing, office rent, admin salaries, and software subscriptions are operating expenses, not COGS. Outbound shipping to customers and payment processing fees are handled differently by different businesses — some put them in cost of sales, others in selling expenses. Either is defensible; switching between them month to month is not, because it makes margins incomparable over time.
Service businesses can have a cost of sales too — subcontractors, job materials, and the direct labor on billable work — but no inventory count. The idea is the same: separate the costs that rise and fall with each sale from the overhead you pay regardless.
The mistakes that distort COGS
Expensing every purchase straight to COGS when it is bought. That makes COGS track purchasing instead of sales: a month of heavy restocking looks like a margin collapse, and the month after looks like a windfall. Purchases should go to inventory, an asset, and move to COGS as goods sell or through the ending-count adjustment.
Skipping or estimating the ending count. Ending inventory is the one number in the formula that comes from outside the books, and every dollar it is overstated becomes a dollar of overstated profit. Shrinkage, damaged goods, and expired stock only show up when someone actually counts.
Never posting the adjustment. Many small businesses count inventory once a year for taxes and never record the result, so the balance sheet carries an inventory number from years ago. Small businesses that meet the IRS gross receipts test may qualify for simplified inventory methods, which is worth raising with your tax preparer — but your monthly reports still need a real number to be useful.
Accurate COGS every month, not just at tax time
Evolv AI categorizes every transaction as it clears, sends inventory purchases to the inventory asset account instead of straight to expense, and keeps sales, cost of goods sold, and inventory adjustments in consistent categories month after month. Anything ambiguous — a supplier payment that mixes product and freight, a vendor refund — is flagged for a human decision.
A real person reviews every close before your P&L and Balance Sheet arrive by day 2 of each month. It is $199 a month flat, with backlog cleanup included when you join and 1099 prep at year end. No contracts, cancel anytime, and subscribing takes about a minute.