COGS Calculator

Calculate cost of goods sold (COGS) for a retail inventory period. Enter beginning inventory, net purchases, any separate inbound freight, and ending inventory.

RETAIL INVENTORY · USD

Inventory and purchases

Enter inventory at cost and purchases for the same period.

USD

Inventory at cost at the start of the period.

USD

Enter inventory purchases after applicable purchase returns, allowances, and discounts. Include inbound freight here only if it is not entered separately.

USD

Add inbound freight on resale goods only if it is not already included in net purchases. Leave blank or enter 0 if none.

USD

Inventory at cost at the end of the same period.

What Is the Cost of Goods Sold (COGS)?

The cost of inventory sold

Cost of goods sold (COGS) is the cost assigned to goods sold during a reporting period. Goods still on hand at the end of the period remain in ending inventory rather than being included in that period's COGS.

A retail inventory model

This calculator uses a basic retail inventory model for businesses that buy and resell goods. It combines beginning inventory, net purchases, and separately entered inbound freight, then subtracts ending inventory. All amounts are in USD.

Enter inventory at cost, not selling prices or item counts. The calculator uses the values you provide; it does not value individual purchase batches or build manufacturing production costs.

Goods prepared for sale beside an inventory cost report
·  COGS covers sold goods; ending inventory is carried forward.

How to Use This Calculator

Inventory shelves, a cost report, and a completed checklist
Beginning inventory$10,000
Net purchases$24,000
Inbound freight$600
Ending inventory$8,500

Cost of goods sold

$26,100.00

  1. 01

    Choose a period and enter beginning inventory

    Use the opening inventory value at cost for the month, quarter, or year you are reviewing.

  2. 02

    Enter net purchases

    Deduct applicable purchase returns, allowances, and discounts from the period’s inventory purchases before entering the amount.

  3. 03

    Add inbound freight if tracked separately

    Enter freight on goods purchased for resale once. Leave this field blank or enter 0 if freight is already included in net purchases or there is none.

  4. 04

    Enter ending inventory

    Use the remaining inventory’s cost at the end of the same period, with a valuation method consistent with the beginning balance.

  5. 05

    Review the results

    The calculator updates COGS, goods available for sale, and net purchases plus freight as you type. If ending inventory exceeds goods available for sale, review the input amounts and periods.

Formula & Equations Used

1

Net purchases

Net purchases = inventory purchases − purchase returns − purchase allowances − purchase discounts

2

Purchase cost

Purchase cost = net purchases + separately entered inbound freight

3

Goods available for sale

Goods available for sale = beginning inventory + purchase cost

4

Cost of goods sold

COGS = beginning inventory + net purchases + separately entered inbound freight − ending inventory

·  Prepare net purchases before entering them. If that total already includes inbound freight, leave the separate freight field blank or enter 0. Use monetary values at cost and a consistent period throughout.

Worked Examples

01 · RETAIL INVENTORY

Retailer with separate inbound freight

Beginning inventory
$10,000
Net purchases
$24,000
Inbound freight
$600
Ending inventory
$8,500

Inbound freight is entered separately.

Goods available for sale$34,600.00
COGS = $10,000 + $24,000 + $600 − $8,500

Cost of goods sold

$26,100.00

02 · RETAIL INVENTORY

New retailer with purchase adjustments

Beginning inventory
$0
Net purchases
$11,200
Inbound freight
$0
Ending inventory
$3,200

Net purchases: $12,000 − $500 returns − $300 discounts = $11,200.

Goods available for sale$11,200.00
COGS = $0 + $11,200 + $0 − $3,200

Cost of goods sold

$8,000.00

·  These illustrative examples use one reporting period and inventory values at cost.

Common COGS Mistakes to Avoid

Missing or double-counting inbound freight

Check acquisition costs against your supplier records. Add freight separately only when it is not already included in net purchases.

Adding general operating expenses

In this retail model, exclude general administration, marketing, and selling expenses from inventory purchases. Manufacturing cost allocation requires a different calculation.

Using inaccurate stock counts

Reconcile ending inventory with stock records and physical counts. Check missing, damaged, or obsolete items before using the inventory value.

Mixing periods or valuation bases

Keep purchases and inventory balances within the same period. Value both inventory balances consistently at cost, rather than using retail prices or quantities.

Overlooking purchase adjustments or entry errors

Reconcile returns, allowances, and discounts before entering net purchases. Check amounts against your records instead of treating the calculator as an automatic inventory audit.

Frequently Asked Questions

Should inventory be entered at cost or selling price?

Use inventory values at cost, not retail selling prices or item counts. Apply a consistent valuation method to the beginning and ending balances for the same reporting period.

Does shipping belong in this calculation?

Inbound freight on merchandise bought for resale can form part of inventory cost. Enter it separately only if it is not already in net purchases. Shipping goods to customers is a selling or distribution expense under the retail model used here.

Does this calculator apply FIFO, LIFO, or weighted average?

No. It calculates COGS from the inventory and purchase totals you enter. Prepare inventory values using the method applicable to your records before entering them; this tool does not select or compare costing methods.

Can I use it for manufacturing or services?

This version is designed for goods purchased for resale. It does not calculate raw materials used, production labor, manufacturing overhead, work in progress, or service delivery costs. Those require a costing model suited to the business.

What if I have no beginning inventory or no purchases?

Enter 0 for a required amount that is genuinely zero. A new retailer can have zero beginning inventory; a period with no purchases can still have COGS from existing stock. The optional freight field can be blank or zero. COGS is zero if ending inventory equals goods available for sale.

Why is my ending inventory flagged?

The entered ending balance exceeds beginning inventory plus net purchases and any separate freight. This basic model cannot return negative COGS. Check dates, cost valuations, missing purchases, and any inventory adjustments outside the model before using the result.