Calculate Cost of Goods Sold for a Period
Calculate cost of goods sold for one period using inventory values at cost. Enter opening stock, purchases, supplier credits, direct costs and closing stock. This COGS calculator shows the cost of goods available and the cost sold. Use the same period and currency throughout.
How to Calculate Cost of Goods Sold
Start with opening inventory at cost. Add purchases after supplier returns and discounts. Add inbound freight and other direct costs only when they are not already in those figures. Subtract closing inventory at cost.
COGS = opening inventory + purchases − supplier credits + inbound freight + other direct costs − closing inventory. The fields use this stock-based model. They do not select an accounting method or prepare a tax return.
Keep Stock Costs Separate From Selling Costs
Use purchase or production costs, not the retail value of unsold goods. Do not add the same freight or direct labor cost twice. Ads, shipping to buyers and payment fees can affect profit. This model does not treat them as stock costs.
Your accounting method sets which costs belong in stock. IRS Publication 334 explains some US small-business rules. Ask your accountant which method fits your business. Use that method each time.
Check the Result Against Your Records
Match the opening and closing stock values to your stock records. Compare purchases and supplier credits with the same period in your books. Closing stock cannot exceed the goods you had to sell. Check the dates and costs if you see this error.
Use the COGS result in your inventory turnover analysis. Revenue minus COGS gives gross profit, before other expenses. Neither figure alone tells you cash flow or net profit.
What If You Do Not Know Ending Inventory?
This stock-based model needs a closing stock value. A blank count is not zero stock. Use a checked stock record or run a clearly labeled range while you finish the count.
Keep the hypothetical $34,500 cost of goods available from the example above. Change only the closing stock value:
Lower Closing Stock
$26,500 COGS$34,500 available − $8,000 closing stock.
Higher Closing Stock
$25,500 COGS$34,500 available − $9,000 closing stock.
A $1,000 increase in closing stock lowers COGS by $1,000 in this model. At the same sales total, gross profit rises by $1,000. This shows how a stock error can change your result.
An estimate based on a past gross margin uses a different method. This tool does not perform that estimate. Replace planning ranges with checked records before you use the result for reporting. IRS Publication 334 describes US stock rules and exceptions; it does not make this range a tax calculation.
Preguntas frecuentes
Does COGS Include Shipping?
The tool has a field for inbound freight not already in stock costs. Outbound customer delivery is a separate cost in this model. Confirm the treatment with your accountant.
Should I Use Selling Prices?
No. Use inventory valued at cost under your accounting method. Retail prices would mix sales value with stock cost.
Can I Use a Monthly Period?
Yes. Opening stock, purchases, costs and closing stock must all refer to the same month.
Is This a Tax Calculator?
No. Use it to plan and check your figures. It does not choose a stock valuation method or decide which costs you can deduct.
Continue Your Store Workflow
Sources and Method
Sources checked November 11, 2026. The tool uses your inputs and the method described above. Source guidance does not certify your result or document.
Disclaimer
This calculator is for educational purposes only. It is a research and planning tool, not intended for commercial use. Chargeflow takes no responsibility for the outcome of any decision you make based on its results.
Results are estimates based on the inputs you enter and on published rates and rules as of the date shown. They are not a quote, an invoice, a guarantee of any cost, fee, profit or outcome, or financial, tax, accounting or legal advice. Do not rely on them to make business, financial or legal decisions.
Rates, fees, card network rules and laws change. Your own terms, eligibility, volumes and location can produce different results. Your provider statement and contract are the record. Verify every figure with official sources and a qualified professional before you act on it.
This calculator is provided as is, without warranties of any kind, express or implied, including accuracy, completeness and fitness for a particular purpose. To the fullest extent permitted by law, Chargeflow is not responsible or liable for any loss, damage or outcome that results from using this calculator or relying on its results. You use it at your own risk.
Third-party names and products appear for identification only. They do not imply affiliation or endorsement. Use of this page is also subject to our Terms of Service.










