Calculate cost of goods sold (cost of sales), gross profit and gross margin for a period from your inventory, purchases and direct labor.
COGS = beginning inventory + purchases + freight-in + direct labor − ending inventory.
Gross profit = revenue − COGS.
Gross margin % = gross profit ÷ revenue × 100.
Inventory turnover = COGS ÷ ((beginning + ending inventory) ÷ 2).
A small food producer starts the month with $18,000 of inventory, buys $42,000 of ingredients and packaging, pays $1,200 freight and $15,000 of production labor, and ends with $16,500 in stock. COGS is $59,700. On revenue of $110,000, that is 54.3% of revenue, leaving $50,300 gross profit, a 45.7% gross margin.
Fictional numbers for illustration only.
Cost of goods sold, also called cost of sales, is what it cost you to produce or buy the products you sold in a period. It sits right under revenue on the income statement, and it decides your gross margin before rent, marketing and admin.
For restaurants, bakeries, retailers and small manufacturers, the most controllable parts are purchasing and direct labor. Run this monthly with a physical inventory count to spot drift early. Your accountant decides which costs belong in COGS for tax purposes.
The calculator treats ending inventory as a number you already have, but that number decides the whole result. Every dollar you overstate in ending inventory comes straight off COGS and shows up as extra gross profit. Most small businesses get it in one of two ways:
Whichever you use, count at the same point in the cycle each time, such as after close on the last day of the month, and value items at what you paid, not at the selling price.
When purchase prices change during the period, the costing method changes COGS. The IRS lists the accepted inventory methods in Publication 538 and asks for the method you use on Form 1125-A. Here is the effect on one product line.
| Item | FIFO | Weighted average |
|---|---|---|
| Beginning stock | 100 units at $4.00 | 100 units at $4.00 |
| Purchased | 200 units at $4.50 | 200 units at $4.50 |
| Cost per unit used | Oldest first: 100 at $4.00, then 120 at $4.50 | $1,300 ÷ 300 = $4.33 |
| COGS | $940.00 | $953.33 |
| Ending inventory | 80 at $4.50 = $360.00 | 80 at $4.33 = $346.67 |
Both columns add up to the same $1,300 of goods available. FIFO puts more of it into ending stock when prices are rising, so COGS is lower and gross profit higher. Pick the method with your accountant and do not switch casually; changing an inventory method for tax purposes generally needs IRS consent.
For manufacturers and food producers, labor that directly makes the product usually is. Service businesses and retailers often leave it out. Follow your accountant’s method and stay consistent.
COGS covers producing or buying what you sold. Selling costs, such as commissions and advertising, are operating expenses below gross profit.
Usually inventory counts. A rushed or estimated count moves cost between months.
Review supplier prices, reduce waste and schedule production labor to demand.
Many report a cost of services instead, made up mainly of the labor and materials used on client work. If you do not hold inventory, the inventory lines in this calculator can be left at zero.
COGS is a dollar cost for the period. Turnover divides that cost by average inventory to show how many times stock was sold and replaced. This calculator shows both from the same inputs.
EZTime records production hours by job and shift, so the labor in your COGS is real. Book a demo to see it.