Cost of Goods Sold Calculator - COGS and Gross Profit
Calculate cost of goods sold from beginning inventory, purchases, and ending inventory, with optional gross profit from revenue.
Enter beginning inventory, purchases, and ending inventory to compute COGS. Add revenue to see gross profit for the same period.
About the Cost of Goods Sold Calculator
Cost of Goods Sold Examples
COGS is beginning inventory plus purchases minus ending inventory; gross profit uses optional revenue.
| Inputs | Result | How to read it |
|---|---|---|
| Beginning $20,000, purchases $50,000, ending $15,000, revenue $90,000 | COGS $55,000.00 | Gross profit is $35,000.00 on that period’s sales. |
| Beginning $8,000, purchases $22,000, ending $5,000, revenue $40,000 | COGS $25,000.00 | Gross profit is $15,000.00 for a smaller shop with faster inventory turn. |
| Beginning $120,000, purchases $340,000, ending $90,000, revenue $500,000 | COGS $370,000.00 | Gross profit is $130,000.00; COGS is 74% of revenue on a high-volume mix. |
How to Use the Cost of Goods Sold Calculator
- Enter beginning inventory at cost for the period, matching last period’s ending figure.
- Enter purchases or manufacturing cost added to inventory during the period.
- Enter ending inventory at cost; use zero if the stock was sold through.
- Optionally enter revenue, then select Calculate to see COGS and gross profit.
Cost of Goods Sold FAQ
What is the COGS formula?
Cost of goods sold equals beginning inventory plus purchases minus ending inventory. The identity values the goods that left inventory during the period at the cost figures you supply.
Does the cost of goods sold calculator use FIFO or LIFO?
Neither method is selected on the page. FIFO, LIFO, or weighted average already sits inside the beginning, purchases, and ending amounts you enter from your records.
Can ending inventory be zero?
Yes. A zero ending count means all goods available for sale were sold or written off, so COGS equals beginning inventory plus purchases. Blank ending inventory is also treated as zero.
How is gross profit calculated?
Gross profit is revenue minus COGS. If you omit revenue, the supporting line is not a meaningful profit figure, so add sales when you want margin as well as cost.
Should freight and labor go into purchases?
Include inbound freight and other costs you capitalize into inventory. Do not include downstream selling costs. Follow the same capitalization policy your accountant uses on the balance sheet.