
Monthly Cost of Goods Sold Formula
Learn how monthly cost of goods sold, gross profit, and gross margin are calculated from inventory and sales figures.
The monthly cost of goods sold formula estimates the direct inventory cost assigned to products sold during a month. It starts with inventory available for sale, then removes the inventory that remains on hand at month-end; this result can then be compared with net sales to estimate gross profit and gross margin.
- 100% Free
- No Sign-Up Required
- Private & Secure
- Mobile Friendly
Monthly Cost of Goods Sold
Where:
Start with beginning inventory, add purchases after supplier returns and direct buying costs, then subtract the inventory still unsold at the end of the month.
Variables Explained
| Variable | What It Means | Unit |
|---|---|---|
| openingInventory - Opening inventory | The recorded inventory value at the start of the month. | currency |
| purchases - Inventory purchases | The cost of inventory purchased during the month before returns and allowances. | currency |
| purchaseReturns - Purchase returns and allowances | Amounts that reduce the cost of purchases, such as inventory returned to suppliers. | currency |
| freightIn - Freight-in and direct buying costs | Direct costs of acquiring inventory, such as inbound shipping, handling, or duty where applicable. | currency |
| closingInventory - Closing inventory | The recorded value of inventory still on hand at the end of the month. | currency |
| salesRevenue - Monthly sales revenue | Net sales revenue used to calculate gross profit and gross margin. | currency |
Step-by-Step Calculation
Calculate net purchases
Subtract supplier returns and purchase allowances from gross inventory purchases.
netPurchases = purchases - purchaseReturns
Find goods available for sale
Combine beginning inventory, net purchases, and direct inventory acquisition costs.
goodsAvailableForSale = openingInventory + netPurchases + freightIn
Calculate cost of goods sold
Subtract inventory still on hand because it was not sold during the month.
costOfGoodsSold = goodsAvailableForSale - closingInventory
Calculate gross profit
Deduct the calculated cost of goods sold from monthly net sales revenue.
grossProfit = salesRevenue - costOfGoodsSold
Calculate gross margin
Express gross profit as a percentage of sales revenue.
grossMargin = (grossProfit / salesRevenue) * 100
Monthly inventory retailer example
Net purchases
$25,000 − $1,000
$24,000
Goods available for sale
$10,000 + $24,000 + $500
$34,500
Cost of goods sold
$34,500 − $12,000
$22,500
Gross profit
$40,000 − $22,500
$17,500
Gross margin
($17,500 ÷ $40,000) × 100
43.8%
Final Result
Estimated monthly COGS is $22,500. Gross profit is $17,500 and gross margin is 43.8%.
Assumptions
- ✓All figures relate to the same monthly accounting period.
- ✓Opening and closing inventory are measured using a consistent inventory valuation method.
- ✓Purchase returns and allowances relate to purchases made for resale or production.
- ✓Freight-in and direct buying costs are included only when they are treated as inventory costs.
- ✓Sales revenue is entered net of sales returns, discounts, and allowances when calculating gross margin.
Limitations
- !The calculation does not include operating expenses such as rent, marketing, administration, or many payroll costs.
- !An incorrect physical count or inventory valuation can materially change the result.
- !The treatment of freight, duties, overhead, write-downs, and production costs can vary by accounting framework and business circumstances.
- !The formula is most appropriate for inventory-based businesses, not businesses that primarily sell services.
- !Results are estimates and are not financial, tax, or professional accounting advice.
Common Mistakes to Avoid
Using sales revenue instead of inventory purchases in the COGS calculation.
Forgetting to subtract purchase returns and supplier allowances.
Adding outbound customer delivery costs as freight-in when they are not acquisition costs.
Leaving out closing inventory, which can overstate COGS.
Mixing values from different months or using gross sales instead of net sales for the margin calculation.
Changing inventory valuation methods between opening and closing balances without adjusting the figures consistently.
Related Formulas
Frequently Asked Questions
What is the monthly cost of goods sold formula?
Monthly COGS equals opening inventory plus purchases minus purchase returns, plus freight-in and direct buying costs, minus closing inventory.
Why is closing inventory subtracted from COGS?
Closing inventory represents goods still on hand at month-end. Because those goods were not sold during the month, their cost is excluded from COGS.
How do purchase returns affect COGS?
Purchase returns and allowances reduce net purchases. Lower net purchases generally reduce goods available for sale and COGS, all else being equal.
Is freight-in included in the COGS formula?
Freight-in and other direct costs required to acquire inventory may be included in inventory cost. The appropriate treatment can depend on the business and accounting approach.
How is gross margin calculated from COGS?
First calculate gross profit as sales revenue minus COGS. Then divide gross profit by sales revenue and multiply by 100.
Can COGS be negative?
A negative result can occur mathematically if closing inventory exceeds goods available for sale, but it often indicates missing, inconsistent, or incorrectly valued inventory data.
Ready to calculate your result?
Use the calculator to get instant results with your own inputs.