# Cost of Goods Sold Calculator

Calculate Cost of Goods Sold using beginning inventory, purchases, and ending inventory. Find gross profit and COGS ratio. Free online COGS calculator.

## What this calculates

Calculate your business's Cost of Goods Sold with our free COGS calculator. Enter beginning inventory, purchases, freight, returns, and ending inventory to find COGS. Optionally provide revenue to see gross profit and the COGS ratio.

## Inputs

- **Beginning Inventory** ($) — min 0 — The value of inventory at the start of the period.
- **Purchases** ($) — min 0 — Total purchases made during the period.
- **Ending Inventory** ($) — min 0 — The value of inventory at the end of the period.
- **Freight In** ($) — min 0 — Shipping costs to receive goods (optional).
- **Purchase Returns & Allowances** ($) — min 0 — Returns or allowances on purchases (optional).
- **Revenue (optional)** ($) — min 0 — Enter revenue to calculate gross profit and COGS ratio.

## Outputs

- **Cost of Goods Sold** — formatted as currency — The total cost of goods sold during the period.
- **Gross Profit** — formatted as currency — Revenue minus COGS (only if revenue is provided).
- **COGS Ratio** — formatted as percentage — COGS as a percentage of revenue.

## Details

Cost of Goods Sold (COGS) represents the direct costs of producing or purchasing the goods a company sells during a period. The formula is: COGS = Beginning Inventory + Purchases + Freight In - Purchase Returns - Ending Inventory. COGS is a critical figure on the income statement because it directly affects gross profit and, ultimately, net income.

The COGS ratio (COGS / Revenue) tells you what percentage of each revenue dollar goes toward producing or acquiring goods. A lower COGS ratio means higher gross margins. For example, a software company might have a COGS ratio of 15-25%, while a grocery store operates at 70-80%. Tracking COGS ratio over time reveals whether the business is becoming more or less efficient at delivering its products.

Accurate inventory tracking is essential for calculating COGS. Most businesses use either FIFO (First In, First Out), LIFO (Last In, First Out), or weighted average cost methods to value inventory and determine which costs are assigned to goods sold. The choice of method affects both COGS and the ending inventory value on the balance sheet, which can have significant tax implications.

## Frequently Asked Questions

**Q: What is included in Cost of Goods Sold?**

A: COGS includes all direct costs of producing or purchasing products sold, including raw materials, direct labor, manufacturing overhead, freight-in costs, and purchase costs. It does not include indirect costs like sales, marketing, office rent, or administrative expenses. For retailers, COGS is primarily the purchase cost of goods sold.

**Q: How does COGS affect taxes?**

A: COGS is deducted from revenue to calculate gross profit, which flows through to taxable income. Higher COGS means lower taxable income and lower taxes. This is why inventory valuation methods (FIFO, LIFO, weighted average) matter: in times of rising prices, LIFO assigns higher costs to COGS, reducing taxable income. FIFO results in lower COGS and higher taxes.

**Q: What is the difference between COGS and operating expenses?**

A: COGS includes only the direct costs of producing or purchasing goods sold. Operating expenses (OPEX) are the indirect costs of running the business: rent, utilities, salaries of non-production staff, marketing, insurance, etc. Revenue minus COGS equals gross profit; gross profit minus operating expenses equals operating income.

---

Source: https://vastcalc.com/calculators/finance/cogs
Category: Finance
Last updated: 2026-04-21
