Cost of Goods Sold Calculator

Calculate your cost of goods sold using inventory, purchases, and ending stock values.

What Is the Cost of Goods Sold (COGS)?

Cost of Goods Sold (COGS) represents the direct costs attributable to the production of goods sold by a business. This includes the cost of materials and labor directly used to create the product. It excludes indirect expenses like distribution and sales force costs. Calculating COGS accurately is essential for determining gross profit and ensuring accurate financial reporting.

How the COGS Calculation Works

The calculator uses the standard accounting formula for Cost of Goods Sold:

COGS = Beginning Inventory + Purchases − Ending Inventory

Each component plays a specific role:

The result reflects the actual cost of inventory that left your possession through sales during that period.

How to Use the COGS Calculator

  1. Enter your Beginning Inventory value for the period.
  2. Enter the total Purchases made during the same period.
  3. Enter your Ending Inventory value at the close of the period.
  4. The calculator instantly returns your Cost of Goods Sold.

All values should be in the same currency. The tool handles the arithmetic automatically.

Practical Example

A small retail store starts the quarter with $10,000 in inventory. During the quarter, they purchase $25,000 worth of additional stock. At the end of the quarter, they count $8,000 worth of unsold inventory remaining.

COGS = $10,000 + $25,000 − $8,000 = $27,000

This means $27,000 worth of inventory was sold during the quarter. The store can use this figure to calculate gross profit by subtracting COGS from total sales revenue.

Understanding Your COGS Result

The COGS figure directly impacts your gross profit margin. A higher COGS means lower gross profit, while a lower COGS indicates higher profitability on sales. The result is used in financial statements to determine taxable income and business performance. It is not a measure of cash flow — it reflects the cost of inventory that was sold, regardless of when payment occurred.

Common Mistakes When Calculating COGS

Limitations of the COGS Formula

The basic COGS formula assumes a simple inventory flow. It does not account for inventory shrinkage, theft, spoilage, or write-downs unless those are factored into the ending inventory value. For businesses with complex manufacturing processes, additional cost components like direct labor and factory overhead must be included. The formula also does not distinguish between different inventory valuation methods, which can produce different COGS figures for the same physical inventory.

Practical Use Cases

Frequently Asked Questions

What is the difference between COGS and operating expenses?

COGS includes only direct costs tied to producing or acquiring goods sold. Operating expenses (SG&A) cover indirect costs like rent, salaries for non-production staff, marketing, and utilities. The two are reported separately on an income statement.

Can COGS be negative?

No. A negative COGS would imply that ending inventory exceeds beginning inventory plus purchases, which is mathematically possible only if inventory was overvalued or recorded incorrectly. In practice, COGS is always a positive number.

Does COGS include labor costs?

For manufacturers, yes — direct labor costs involved in production are included in COGS. For retailers and wholesalers, labor costs are typically classified as operating expenses unless they are directly tied to preparing inventory for sale.

How often should I calculate COGS?

Most businesses calculate COGS at the end of each accounting period — monthly, quarterly, or annually. The frequency depends on reporting requirements and inventory turnover. More frequent calculations help identify cost trends earlier.

What inventory valuation method should I use?

The choice between FIFO (First In, First Out), LIFO (Last In, First Out), and weighted average depends on your business type, tax strategy, and accounting standards. FIFO is common for perishable goods, while LIFO can offer tax advantages in inflationary periods. Consult an accountant for guidance specific to your situation.