Free Cost of Goods Sold Calculator

Enter your inventory and purchase figures — see COGS, gross profit, and margin instantly

Quick presets:

Inventory & Purchases

Stock value at period start
All goods bought during period
Stock value at period end
Total sales for gross profit

$0.00

Cost of Goods Sold

COGS

$0.00

Gross Profit

Gross Margin

COGS Ratio

Formula Breakdown

Beginning Inventory $0.00
+ Purchases $0.00
= Goods Available for Sale $0.00
− Ending Inventory $0.00

= Cost of Goods Sold $0.00

What Is Cost of Goods Sold (COGS)?

Cost of goods sold (COGS) represents the direct costs of producing or purchasing the products you sell during a specific period. For ecommerce sellers, COGS includes the wholesale price of inventory, inbound shipping and freight, packaging materials, and any direct labour costs tied to getting products ready for sale. Understanding your COGS is essential because it directly determines your gross profit — the money left after covering product costs but before operating expenses.

How to Calculate COGS

The standard COGS formula is: COGS = Beginning Inventory + Purchases − Ending Inventory. Begin with the value of stock you had at the start of the period, add everything you purchased or manufactured, then subtract what remains unsold at the end. For example, if you started a quarter with $10,000 in inventory, bought $25,000 more stock, and ended with $8,000 remaining, your COGS is $27,000. This calculator does the maths for you instantly and also computes gross profit when you enter your revenue.

What Costs Are Included in COGS?

For ecommerce sellers, COGS typically includes the purchase price of goods, inbound freight and shipping to your warehouse, customs duties and import taxes, packaging materials, and direct labour for assembly or kitting. It does not include operating expenses like rent, marketing, software subscriptions, or salaries for non-production staff. Understanding this distinction matters when calculating profitability across marketplaces like Shopee, Lazada, or Temu, where platform fees are separate from COGS.

Why Does COGS Matter for Ecommerce Sellers?

COGS is the largest expense for most product-based businesses and directly impacts three critical metrics. First, your gross profit margin — healthy ecommerce margins typically range from 30% to 60% depending on the category. Second, your pricing strategy — you cannot set competitive prices without knowing your true product costs. Third, your tax liability — COGS is deductible, so accurate tracking reduces your taxable income. Sellers on multiple platforms need to track COGS carefully because the same product may have different associated costs (shipping to different warehouses, varying packaging requirements) across channels.

COGS vs Operating Expenses: What's the Difference?

COGS covers only the direct costs tied to products you actually sold. Operating expenses (OPEX) cover everything else: warehouse rent, employee salaries, software tools, advertising, and utilities. Your gross profit = revenue − COGS, while your net profit = revenue − COGS − OPEX. A common mistake among new sellers is lumping all costs together. By separating COGS from OPEX, you can identify whether low profitability comes from buying too expensively (a COGS problem) or spending too much on operations (an OPEX problem). Use our markup calculator to check whether your per-product pricing covers both.

How Often Should You Calculate COGS?

At minimum, calculate COGS monthly. High-volume sellers should track it weekly. The more frequently you calculate, the faster you spot problems — a supplier price increase, an inventory shrinkage issue, or a category that's become unprofitable. For multi-channel sellers managing inventory across Shopee, Lazada, Amazon, TikTok Shop, and your own website, a centralised system that tracks purchases and stock levels across all channels makes COGS calculation far simpler than manual spreadsheets.

Track COGS automatically across all your sales channels

Try OneCart Free