Posted on 24 March 2025
Author : Haya Assem
Reviewed By : Enerpize Team

How to Calculate Cost of Goods Sold: Formula & Examples

how to calculate cost of goods sold

Calculating the cost of goods sold (COGS) is essential for tracking direct costs associated with goods sold and maintaining accurate financial records. Understanding its formula, components, and accounting methods helps businesses manage expenses and improve profitability.

 

Key Takeaways

  • COGS represents the direct costs of producing or purchasing goods sold by a business.
  • Formula: Beginning Inventory + Purchases - Ending Inventory.
  • COGS includes raw materials, direct labor, and manufacturing costs.
  • COGS excludes indirect expenses like marketing, administration, and distribution.
  • Accounting Methods such as FIFO, LIFO, and Weighted Average impact cost calculations.
  • Automation with cloud-based accounting software improves accuracy and efficiency.

 

What is the Cost of Goods Sold?

The cost of goods sold (COGS) is the direct cost of producing or purchasing the goods a business sells, including materials, labor, and manufacturing expenses, but excluding indirect costs like marketing and administration.

 

Basic Cost of Goods Sold Formula

The formula to calculate the cost of goods sold calculates the direct costs of the goods a business sells during a specific period. It considers inventory at the start and end of the period, along with any new purchases made.

 

Formula

COGS = Beginning Inventory + Purchases - Ending Inventory

 

  • Beginning Inventory: The value of unsold goods carried over from the previous period.
  • Purchases: The cost of additional inventory bought during the period.
  • Ending Inventory: The value of unsold goods at the end of the period.

 

How to Calculate Cost of Goods Sold?

The cost of goods sold (COGS) is a crucial financial metric that helps businesses determine their direct expenses for producing or purchasing goods sold during a given period. Follow the steps below to calculate COGS:

 

1- Identify Beginning Inventory

The beginning inventory is the total value of goods available at the start of the accounting period. It includes leftover stock from the previous period and can be found in the company’s balance sheet under inventory.

 

2- Add Purchases Made During the Period

Any additional goods or raw materials bought during the period are added to the beginning inventory. This includes transportation costs, direct labor, and other direct costs related to acquiring inventory. If the company produces its goods, this also includes manufacturing costs like labor and materials.

 

3- Determine Ending Inventory

The ending inventory is the value of unsold goods remaining at the end of the period. Businesses usually conduct a physical inventory count or use accounting records to determine this amount.

 

4- Apply the COGS Formula

Once you have all the necessary values, apply the formula:

COGS = Beginning Inventory + Purchases - Ending Inventory

 

What Is Included in and Excluded from the Cost of Goods Sold?

The cost of goods sold (COGS) includes direct expenses involved in producing or purchasing goods, but it excludes indirect costs related to operations, marketing, and administration.

 

Included in COGS:

COGS includes all direct costs related to producing or purchasing goods that a business sells. These costs typically include:

  • Raw materials used in manufacturing products.
  • Direct labor costs for workers involved in production.
  • Manufacturing costs, such as factory utilities and equipment maintenance.
  • Freight-in costs for shipping raw materials to the production site.
  • Storage costs are directly related to holding inventory before sale.

 

Excluded from COGS:

COGS does not include indirect expenses that are not directly tied to the production of goods. These excluded costs are:

  • Administrative expenses, such as office salaries and rent.
  • Marketing and advertising costs for promoting products.
  • Freight-out costs (shipping expenses to deliver products to customers).
  • Research and development (R&D) expenses for new products.
  • Depreciation on office buildings and unrelated assets.

 

Calculating Cost of Goods Sold Examples

To better understand how to calculate the Cost of Goods Sold (COGS), let’s go through some practical examples using different scenarios.

 

Example 1: Retail Business

A clothing store starts the year with $20,000 in inventory. During the year, it purchases $15,000 worth of additional stock. At the end of the year, the remaining inventory is $10,000.

Using the COGS formula:

COGS = Beginning Inventory + Purchases - Ending Inventory

COGS = 20,000 + 15,000 - 10,000 = 25,000

The store's COGS for the year is $25,000, meaning it spent this amount on the clothing it sold.

 

Example 2: Manufacturing Business

A furniture manufacturer starts the month with $50,000 worth of raw materials. It purchases $30,000 in wood and other materials. At the end of the month, the unused materials total $20,000.

COGS = 50,000 + 30,000 - 20,000

COGS = 60,000

The company’s COGS for the month is $60,000, representing the cost of materials used to manufacture and sell the furniture.

 

Accounting Methods for COGS

Businesses use different accounting methods to calculate COGS, affecting how inventory costs are recorded and reported. The choice of method can influence financial statements, tax liabilities, and profitability.

 

First-In, First-Out (FIFO) – How to Calculate FIFO Cost of Goods Sold

Under FIFO, the oldest inventory (first purchased) is sold first, while newer inventory remains in stock. This method assumes that earlier costs are matched with revenue, often resulting in lower COGS and higher profits during inflationary periods since older, cheaper inventory is recorded as sold. It provides a more accurate reflection of inventory value on the balance sheet but may lead to higher taxes due to increased reported profits.

 

Last-In, First-Out (LIFO) – How to Calculate Cost of Goods Sold Using LIFO

With LIFO, the newest inventory (last purchased) is sold first, while older inventory remains in stock. This results in higher COGS and lower profits when prices are rising, which can provide tax benefits by reducing taxable income.

However, LIFO can lead to outdated inventory valuation on the balance sheet. Additionally, it is not permitted under International Financial Reporting Standards (IFRS) and is mainly used in the U.S. under Generally Accepted Accounting Principles (GAAP).

 

Weighted Average Cost (WAC) – Calculating COGS using WAC

The WAC method calculates an average cost per unit by dividing the total cost of inventory by the total units available. This method smooths out price fluctuations and prevents extreme variations in COGS, making it useful for businesses with large volumes of similar items. It simplifies inventory accounting and provides a balanced valuation approach, though it may not be as accurate as FIFO or LIFO when prices fluctuate significantly.

 

Automate COGS With Enerpize

Enerpize is an all-in-one online accounting software designed to streamline financial management for businesses of all sizes. It offers automated bookkeeping, invoicing, expense tracking, and inventory management, making accounting more efficient and hassle-free.

Managing Cost of Goods Sold (COGS) manually can be time-consuming and prone to errors, especially as businesses grow. Enerpize automates COGS calculations by integrating real-time inventory tracking with purchase and sales records. It ensures accurate financial reporting by automatically updating inventory values and linking transactions, minimizing human errors and enhancing efficiency. With automated financial reports and seamless transaction tracking, businesses can maintain precise COGS calculations, improve profitability analysis, and focus on strategic growth without manual accounting burdens.

 

FAQs About COGS

 

How to calculate the cost of goods sold from the income statement?

To determine COGS from an income statement, follow these steps:

  1. Locate Revenue (Sales): Find the total sales revenue listed at the top of the income statement.
  2. Find Beginning Inventory: Look for the inventory value from the previous period’s balance sheet.
  3. Identify Purchases: Include all costs of acquiring or producing goods during the period.
  4. Find Ending Inventory: Check the current period’s balance sheet for the remaining inventory.
  5. Apply the COGS Formula: COGS = Beginning Inventory + Purchases - Ending Inventory

Once calculated, COGS appears as a direct expense below revenue on the income statement, impacting gross profit. 

 

How to calculate the adjusted cost of goods sold?

Adjusted COGS accounts for additional factors like inventory write-offs, shrinkage, or manufacturing adjustments.

Use this formula: Adjusted COGS = COGS + Adjustments (e.g., inventory loss, damages, or overhead costs)

To calculate it:

  1. Calculate COGS using the standard formula.
  2. Add or subtract adjustments such as damaged goods, shrinkage, or additional costs.
  3. The result is the adjusted COGS, reflecting the true cost of goods sold.

 

How to calculate the cost of goods sold percentage?

The COGS percentage (or COGS-to-Sales Ratio) measures the proportion of revenue spent on goods sold.

Use this formula:

COGS Percentage=(COGSCOGS Percentage)×100

 

To calculate it:

  1. Find COGS from the income statement.
  2. Divide COGS by total revenue (sales).
  3. Multiply by 100 to get the percentage.

A lower COGS percentage indicates higher profitability, while a higher percentage suggests increased production costs.

Calculating COGS is easy with Enerpize.

try free

Try our accounting module to calculate the costs of goods sold with some clicks.

Start Your Free Trial NOW

Calculating COGS is easy with Enerpize.

try free

Try our accounting module to calculate the costs of goods sold with some clicks.

Start Your Free Trial NOW

this icon to close popup

Sales

Create and send online quotations and invoices, track sales, monitor staff performance, and sell & sync all your products via our POS and more.

Accounting

Manage your cash flow, purchases, taxes, profit & loss, balance sheet, sales, chart of accounts, income statement, assets and more.

Operations

Create and manage work orders, assign clients and employees, add expenses, incomes, and invoices, schedule appointments and more.

HR

Set up your organizational structure, add employees, create contracts, manage employees’ shifts, attendance, payroll and more.

Inventory

Add unlimited products, control different warehouses, issue purchase orders to your suppliers, follow them with ease and more.

CRM

Create clients profiles, add notes, attach files, schedule appointments, reservations, follow up calls/emails or delivery easily and more.

this icon to close popup