Cost of Goods Sold (COGS) Calculator
Enter opening inventory, purchases and closing inventory to get COGS.
Result
How it is calculated
The tool uses the periodic-inventory formula COGS = O + P - C, where O is the value of inventory at the start of the period, P is what you purchased during it and C is the inventory still on hand at the end. All three are money amounts for the same period and the same valuation method (cost, not selling price), and none may be negative. The result is shown in dollars with two decimals. Closing inventory cannot be larger than opening inventory plus purchases, because you cannot end with more stock than was available; if it is, the tool shows no result so the count can be rechecked. Freight, labour or manufacturing overhead are not added unless you include them in the purchases figure.
Worked example
A shop starts the quarter with $45,000 of stock, buys $120,000 more and counts $38,000 at the end. Step 1: goods available for sale are 45000 + 120000 = 165000. Step 2: subtract what is left, 165000 - 38000. The tool shows $127,000.00, the cost of the products sold in the period. If the shop's sales were $190,000, gross profit would be 190000 - 127000 = $63,000 before other expenses.
Common mistakes
- Valuing the closing stock at selling price instead of cost; this understates COGS and inflates profit.
- Including purchases not yet received, or leaving out returns to suppliers; the purchases figure should reflect what really entered inventory.
- Mixing balances from different periods, such as a year-end stock count with one month of purchases.
- Forgetting that stolen or spoiled stock is missing from the closing count, so it ends up inside COGS rather than being shown separately.
- Entering a closing count above opening plus purchases. The tool then shows no result; recount instead of adjusting the other figures to make it work.
Sources
- Form 1125-A, Cost of Goods Sold (Rev. November 2024) — Internal Revenue Service
About this calculator
Cost of goods sold follows the basic inventory equation: COGS = opening inventory + purchases − closing inventory — whatever inventory you started with, plus what you bought, minus what's left unsold, must be what you sold during the period.
It's the first line subtracted from revenue to get gross profit on every income statement, and retailers and manufacturers track it closely because it directly drives gross margin — a rising COGS relative to revenue, even with sales growing, usually signals supplier price increases, discounting, or inventory shrinkage eating into profitability.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm’s Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Comments