Cost of Goods Sold (COGS) Calculator
Just enter beginning inventory, purchases, and ending inventory to instantly calculate your cost of goods sold. Add sales revenue and it also works out gross profit, cost ratio, and gross margin.
Input
Enter sales revenue to also calculate gross profit, cost ratio, and gross margin.
Result
Cost of goods sold
$2,800,000.00
Beginning inventory + Purchases − Ending inventory
Gross profit
$2,200,000.00
Cost ratio
56.0 %
Gross margin
44.0 %
Calculation breakdown
| Beginning inventory | $500,000.00 |
| + Purchases | $3,000,000.00 |
| − Ending inventory | $700,000.00 |
| = Cost of goods sold | $2,800,000.00 |
| Sales revenue | $5,000,000.00 |
| Gross profit | $2,200,000.00 |
How it works
- Cost of goods sold is calculated as "beginning inventory + purchases − ending inventory." Beginning and ending inventory are the value of stock (goods or products) on hand at the start and end of the period.
- When you enter sales revenue, gross profit is calculated as sales revenue − cost of goods sold. Gross profit is a basic measure of how much your core business earns.
- The cost ratio is found with "cost of goods sold ÷ sales revenue × 100." A lower figure means costs are kept down relative to sales.
- The gross margin (gross profit ratio) is found with "gross profit ÷ sales revenue × 100," and the cost ratio plus the gross margin add up to roughly 100%.
- This tool uses the basic formula for a retail (buy-and-resell) business. In manufacturing, the cost of goods manufactured is used instead of purchases, so the treatment can differ by industry and accounting method.
- Note: the amounts and ratios shown are estimates derived from your inputs. The actual cost of goods sold for accounting and tax purposes may differ depending on inventory valuation methods, accounting standards, and each business's treatment. Please confirm official figures with a tax accountant or accounting firm.
Related calculators
Sales Tax & VAT Calculator
MoneyAdd or remove sales tax / VAT from any price. Enter an amount and rate to instantly see the net price, tax amount, and gross total, with your choice of rounding.
Open calculator →Loan Payment Calculator
MoneyJust enter the loan amount, annual interest rate and term to instantly calculate your monthly payment, total repayment and total interest. Supports equal-payment and equal-principal methods, with a modern chart of the principal-vs-interest breakdown.
Open calculator →Lottery Winning Odds Calculator
MoneyPick a lottery type (Loto 6, Loto 7, Mini Loto, or Jumbo) and the number of tickets to calculate your odds of hitting the jackpot, your chance of winning any prize, and the expected payout rate. Compare the odds against everyday events to feel just how unlikely a win really is.
Open calculator →Loan Repayment Calculator with Bonus Payments
MoneyEnter your loan amount, interest rate and term, plus the share repaid through bonus payments and how often they occur, to instantly compute your monthly payment, each bonus payment, the annual and total repayment, and total interest using the equal-payment method. A year-by-year amortization schedule is included.
Open calculator →