Free tool · Inventory
COGS calculator
What the goods you sold really cost.
Enter beginning inventory, purchases and ending inventory to get the cost of goods sold for a period, with freight-in and purchase returns if you have them.
Add net sales and you also see COGS as a share of sales, gross profit and gross margin. Works in any currency.
How it is calculated
Cost of goods sold formula
COGS = beginning inventory + purchases + freight-in − purchase returns and discounts − ending inventory
COGS as % of sales = COGS / net sales × 100
Gross profit = net sales − COGS
Gross margin = gross profit / net sales × 100
Example
25,000 + 108,000 + 3,000 − 1,000 − 15,000 = 120,000 COGS
Net sales 200,000: 120,000 / 200,000 = 60% COGS share
200,000 − 120,000 = 80,000 gross profit, 40% gross margin
All values at cost and excluding VAT. With COGS and average inventory the inventory turnover calculator shows how often your stock sells through; the profit margin calculator works on single products.
COGS FAQ
How do I calculate cost of goods sold?
COGS = beginning inventory + purchases + freight-in − purchase returns and discounts − ending inventory, everything at cost. Example: 25,000 + 108,000 + 3,000 − 1,000 − 15,000 = 120,000 cost of goods sold.
What is the difference between purchases and COGS?
Purchases are everything you bought in the period. Cost of goods sold is only the part you actually sold. What is still in stock at the end does not count, while goods from the beginning inventory that you sold do.
How do I calculate COGS as a percentage of sales?
Divide COGS by net sales and multiply by 100. 120,000 cost of goods sold on 200,000 net sales is 60%: of every 1.00 in sales, 0.60 goes to the goods you sold.
How are COGS and gross profit related?
Gross profit = net sales − COGS, in the example 200,000 − 120,000 = 80,000. Gross margin (40%) and COGS share (60%) always add up to 100%. Staff, rent, shipping to customers, advertising and all other costs still have to be paid from gross profit.
What counts as freight-in?
Costs that come on top of the purchase price to get the goods to you, such as shipping from the supplier, customs duties and transport insurance. They raise the cost of the goods and therefore COGS. Purchase discounts, rebates and returns to the supplier are subtracted.
How do I calculate COGS without counting inventory?
Without a counted ending inventory it can only be estimated, for example from sales and your average gross margin: net sales × (1 − gross margin). With 200,000 in sales and a 40% margin that is 120,000. It only becomes exact with the stock from a count or your inventory system.
For online stores
Stock only turns into gross profit once it is found
Grumeria is a typo-tolerant site search for online stores. When the store search finds nothing for a misspelled word, the product sits in stock while the visitor leaves. The free feed check shows on your own products what Grumeria finds for such searches; it reads WooCommerce, Shopify, Magento and PrestaShop stores straight from the store address.
- 14-day free trial, no payment method needed
- Then from €29 a month (excl. VAT)
- Free feed check, no account needed