Cost of Goods Sold Calculator estimates the direct cost assigned to inventory sold during an accounting period. Enter beginning inventory, purchases, eligible acquisition costs, and ending inventory. For manufacturers, include direct production labor and allocated production overhead. Add sales revenue to review estimated gross profit and gross margin.
Cost of goods sold results
Planning estimate based on the amounts and inventory valuation method you enter. Display currency is for formatting only.
Cost of Goods Sold Calculator formula and example
The Cost of Goods Sold Calculator uses a periodic inventory equation to estimate the direct cost assigned to the goods sold during a chosen accounting period. The Cost of Goods Sold Calculator starts with inventory on hand, adds the net cost of purchases and eligible production or acquisition costs, then subtracts inventory still on hand at the end.
Net purchases = Purchases − Returns and allowances − Purchase discounts
For a manufacturer, direct production labor and allocated production overhead may also be included in the cost of goods available for sale, subject to the accounting method and applicable rules. The Cost of Goods Sold Calculator adds those fields only when you select Manufacturer. It does not determine which costs qualify or choose an inventory valuation method for you.
Worked COGS example
Suppose a retailer starts the month with $15,000 of inventory, buys $8,000 of goods, pays $200 in eligible inbound freight, and ends the month with $6,000 of inventory. With no purchase returns or discounts, goods available for sale are $23,200. Subtracting ending inventory gives estimated COGS of $17,200. If sales revenue is $25,000, estimated gross profit is $7,800 and gross margin is 31.2%.
| Calculation step | Amount |
|---|---|
| Beginning inventory | $15,000 |
| Purchases plus eligible freight | $8,200 |
| Goods available for sale | $23,200 |
| Less ending inventory | −$6,000 |
| Estimated cost of goods sold | $17,200 |
| Sales revenue less COGS | $7,800 gross profit |
What belongs in cost of goods sold?
Retailers and resellers
For a retailer, the calculation generally relates to the cost of merchandise sold, adjusted for inventory remaining. Purchases should be recorded consistently and reduced by applicable supplier returns, allowances, or purchase discounts. Inbound freight and similar costs can form part of inventory cost when applicable. Do not include the retail selling price of unsold inventory as an inventory cost.
Manufacturers
Manufacturers may need to include direct materials, direct labor, and allocated production overhead in the cost of products made. The amount assigned to goods sold depends on how production costs are accumulated and how ending inventory is valued. Use Manufacturer mode in the Cost of Goods Sold Calculator to enter direct labor and allocated overhead alongside inventory and purchases.
Operating expenses
The Cost of Goods Sold Calculator excludes general selling, administrative, marketing, interest, and unrelated office costs from direct product costs. Gross profit is revenue minus COGS; operating expenses are considered later in an income statement. Avoid counting the same expense in both COGS and operating expenses.
How to use the Cost of Goods Sold Calculator
- Choose Retailer or reseller, or Manufacturer if you need the production-cost fields.
- Enter beginning inventory and purchases for the same period.
- Subtract purchase returns, allowances, and discounts from purchases.
- Add eligible inbound freight and, for manufacturing, direct labor and allocated production overhead.
- Enter ending inventory at cost using your established inventory valuation method.
- Optionally enter sales revenue to see estimated gross profit, gross margin, and COGS as a share of sales.
- Select a currency for display, calculate, then print or download a CSV report.
Inventory method and accuracy
The Cost of Goods Sold Calculator uses the values supplied. The Cost of Goods Sold Calculator does not track individual items or calculate ending inventory using FIFO, LIFO, weighted average, specific identification, or a retail inventory method. The chosen inventory method can affect both ending inventory and COGS, especially when purchase costs change. Use inventory figures from the same records and accounting method, and check whether your organization or jurisdiction requires a particular treatment.
A negative COGS result or an ending inventory value greater than goods available usually means one or more inputs need review. Check that all inventory values are at cost, periods match, purchase credits are not counted twice, and manufacturing costs are allocated consistently. If the estimate is for tax reporting, verify the amounts against current official instructions and records.
Related Business Calculators
Use the Gross Profit Calculator to analyze sales less direct costs, the Inventory Turnover Calculator to compare COGS with average inventory, and the Working Capital Calculator to review short-term liquidity. Browse all Business Calculators for more planning tools.
Limitations and source
The Cost of Goods Sold Calculator is an educational estimate and does not provide tax or accounting advice. Rules for inventory, cost capitalization, allowable deductions, and reporting differ by business and jurisdiction. The U.S. Internal Revenue Service explains inventory and cost of goods sold for small businesses in Publication 334. Confirm your applicable rules with current official guidance or a qualified accountant.
Frequently asked questions
What is cost of goods sold?
Cost of goods sold is the direct cost assigned to goods sold during a period. It is typically used to calculate gross profit by subtracting COGS from sales revenue.
What is the basic COGS formula?
The periodic formula is beginning inventory plus net purchases and eligible direct costs, minus ending inventory. Manufacturing costs may require additional direct labor and allocated overhead.
Does COGS include rent or advertising?
General rent, advertising, and administrative expenses are usually operating expenses rather than direct product costs. Specific inventory-cost rules vary, so confirm the treatment for your business.
Why does ending inventory reduce COGS?
Ending inventory represents goods not assigned to sales during the period. Subtracting it leaves the cost attributed to goods sold under the periodic calculation.
Can the Cost of Goods Sold Calculator choose FIFO or weighted average?
No. It uses the beginning and ending inventory values you provide and does not track item-level transactions or determine an inventory valuation method.
Can a service business use this tool?
A service-only business may not have merchandise inventory. A business that sells products or incurs direct costs tied to goods provided may use a COGS calculation, but it should classify costs consistently under its accounting rules.
Related topics: Profit Margin Calculator · Accounts Receivable Turnover Calculator