What Is Cost of Goods Sold (COGS) and How Do You Calculate It?

What Is Cost of Goods Sold (COGS) and How Do You Calculate It?
Cost of goods sold (COGS) is one of the most important numbers for understanding your true profitability, and this guide breaks down exactly what’s included and how to calculate it. Learn how COGS impacts pricing, margins, and financial decisions so you can run a more efficient and profitable business.
by Eric Rosenberg Dec 22, 2025 — 10 min read
What Is Cost of Goods Sold (COGS) and How Do You Calculate It?
This article is for educational purposes and does not constitute legal, financial, or tax advice. For specific advice applicable to your business, please contact a professional.

When you run a business, cost of goods sold (COGS) is one of the most important metrics to understand. It plays a major role in your overall profitability, so knowing how COGS works and how it flows into your business results is essential for any owner or manager.

If you want to better understand cost of goods sold and how it impacts your business, this guide breaks down what COGS includes, how to calculate it, and how to use it to make more informed decisions for your business.

What is cost of goods sold?

Cost of goods sold is the total amount your business paid as a cost directly related to the sale of products. Depending on your business, that may include products purchased for resale, raw materials, packaging, and direct labor related to producing or selling the goods.

In other words, the materials that go into the product and the labor of making each unit may be included in cost of goods sold. If you incur sales costs specific to that item, like storage costs, those costs may also be included in COGS. The accounting term for this is direct costs.

But if a cost is general for your business, like rent, a new machine, or common marketing costs, it isn’t a cost 100% dedicated to a specific item. Those indirect costs are considered overhead, not the cost of goods sold.

What’s included in cost of goods sold?

Understanding what belongs in COGS helps you calculate it accurately and determine the true profitability of each item you offer. Here’s what is typically included:

 

These items are included because they help determine the true cost of getting each product into a sellable state. Indirect expenses, like rent, administrative salaries, marketing, or general utilities, are not included in COGS because they support the business overall rather than any single product.

Cost of sales vs. cost of goods sold

Cost of sales and cost of goods sold (COGS) are closely related terms, and many businesses use them interchangeably. The difference usually depends on the type of business you run. COGS refers to the direct costs of producing or purchasing physical goods. Cost of sales is a broader term often used by service-based businesses to describe the direct costs of delivering a service, such as labor or subcontractor fees.

In practice, both represent the direct expenses required to fulfill a sale, and both help you understand the minimum cost of operating your business. The key distinction is that COGS is tied to tangible products, while cost of sales can apply to products, services, or a mix of both.

Why is COGS important?

Cost of goods sold is an important to track because it reveals the absolute lowest price you can sell a product to break even. When you understand your COGS, you know exactly how much room you have to cover overhead expenses and generate profit. If you don’t know your COGS and break-even point, you don’t know if you’re making or losing money.

To help you track your profitability, use a profit and loss template. Cost of goods sold is a major input in profit and loss statements. Note that the terms “profit and loss statement” and “income statement” are used interchangeably based on business.

How to calculate cost of goods sold

If you’re wondering how to find cost of goods sold for your business, the standard formula used by accountants and bookkeepers is:

Beginning Inventory + Purchases – Ending Inventory = Cost of Goods Sold

If you have any manufacturing labor costs or direct sales costs, you can include those as well, but that may not apply to all businesses.

Here’s what each part means:

 

When you subtract ending inventory, you remove the items you didn’t sell. This leaves only the cost of the products that actually went out the door.

Using the above example:

$5,000 (Beginning Inventory) + $3,000 (Purchases) – $2,000 (Ending Inventory) = $6,000 COGS

This means your business sold $6,000 worth of product during the period.

Inventory accounting methods like LIFO and FIFO determine how to value the inventory you sell and the inventory that remains on hand.

LIFO method

LIFO stands for last in, first out, which means the most recently purchased items are counted as sold first. This method assumes that the newest inventory leaves your shelves before older inventory. Businesses may use LIFO in periods of rising costs because it matches higher, more recent costs against current sales.

Below is a simple example of how to calculate COGS using LIFO. We’ll assume the business starts the period with no beginning inventory and makes two purchases:

 

Total units bought: 200
Units sold during the month: 120

Under LIFO, the last items purchased are the first ones counted as sold.

Step-by-step calculation using the LIFO method:

  1. We start with the newest inventory. The entire batch of 100 units at $12 is treated as sold first, giving us a cost of: 100 × $12 = $1,200
  2. To reach the full 120 units sold, we still need 20 more units. Those come from the next oldest batch, priced at $10 each: 20 × $10 = $200
  3. When we combine both, we get total COGS under LIFO: $1,200 + $200 = $1,400

 

Ending inventory under LIFO:

The business originally had 200 units. After selling 120, 80 units remain. Under LIFO, all remaining units come from the oldest inventory still on hand, which is the $10 batch:

80 × $10 = $800 ending inventory

LIFO often results in higher COGS during periods of rising prices because it assigns the most recent, higher-cost inventory to the goods sold.

FIFO Method

FIFO stands for first in, first out, which means the oldest inventory is counted as sold first. This method assumes that products move in the order they were purchased. Many businesses use FIFO because it reflects the natural flow of inventory, especially for perishable or fast-moving goods.

Let’s use the same example as before and again assume there is no beginning inventory. During the period, the business makes two purchases:

 

Total units bought: 200
Units sold during the month: 120

Under FIFO, the earliest purchased items are counted as sold first.

Step-by-step calculation using the LIFO method:

  1. We begin with the oldest inventory. The full batch of 100 units at $10 is treated as sold first: 100 × $10 = $1,000
  2. To reach the full 120 units sold, we need 20 additional units. These come from the next batch, priced at $12 each: 20 × $12 = $240
  3. When we combine these amounts, we get total COGS under FIFO: $1,000 + $240 = $1,240

 

Ending inventory under FIFO:

The business started with 200 units and sold 120, leaving 80 units. Under FIFO, all remaining units come from the more recent $12 batch:

80 × $12 = $960 ending inventory

FIFO typically results in lower COGS when prices are rising because it applies older, lower-cost inventory to the goods sold.

 

Learn more: Check out our free Cash Flow Template for Small-Business Owners

Cost of goods sold examples

Cost of goods sold applies to businesses of all sizes, and the formula stays the same no matter how simple or complex your inventory is. Public companies are even required by law to share this information in their annual reports, so you can always look at cost of goods sold, or cost of sales, for any company listed on a major U.S. stock exchange.

To really understand COGs, here are two examples that show how it works in practice using the standard cost of goods formula:

Beginning Inventory + Purchases – Ending Inventory = Cost of Goods Sold

Example 1: Calculating COGS for a small retail business

A shop starts the year with $15,000 worth of inventory. During the year, the owner purchases an additional $20,000 in products. At the end of the year, a physical count shows $10,000 worth of inventory still on hand.

Using the COGS formula:

Beginning Inventory + Purchases – Ending Inventory = COGS
$15,000 + $20,000 – $10,000 = $25,000

This means the business sold $25,000 worth of inventory during the year.

Example 2: Calculating COGS for a coffee shop using ingredients

A coffee shop begins the month with $3,000 worth of ingredients. Throughout the month, it purchases an additional $2,500 in coffee beans, milk, syrups, and pastries. At the end of the month, $1,200 worth of ingredients remain.

Using the COGS formula:

$3,000 + $2,500 – $1,200 = $4,300 COGS

This means the shop used $4,300 worth of ingredients to produce the drinks and pastries it sold that month.

This example also highlights why tracking inventory matters. If ingredient prices increase or waste becomes a problem, COGS will rise and margins will shrink.

Learning from cost of goods sold

To get more comfortable with your business’s numbers, think of your business in these ways to better understand your COGS:

 

You don’t need a strong financial background to use COGS to build a more profitable long-term business strategy. Anyone can use COGS to improve their business.

Business metrics that use cost of goods sold

Understanding your company’s COGS is an important step on the path to understanding its overall health. While informative on it’s own, COGS is also a critical input (or sidekick) to other key performance metrics such as gross profit, operating expenses, overhead costs, and variable costs.

Let’s dive into how COGS relates to the following business metrics:

Using cost of goods sold to improve profitability

Large companies hire teams of accountants and FP&A (financial planning and analysis) analysts to review every cost with a fine-tooth comb. While you may want to seek professional help, you can do your own calculation. Retail businesses that use the Square POS system have quick access to this information on the Square Dashboard with analytics, inventory, and other reporting tools.

When you know what makes up your business costs, you can take steps to keep them under control and work toward your growth and profitability goals. Whether you’re trying to create or maintain a business to support your family or set yourself up for retirement, COGS is almost certainly part of the formula. With a good understanding of how it works, you are in better control of your company’s destiny.

Costs of goods sold FAQs

What costs are included in cost of goods sold?

COGS includes all direct costs required to produce or purchase the items you sell. This typically covers raw materials, wholesale products, packaging, freight related to acquiring inventory, and direct labor tied to production or preparation. These expenses can be traced to specific products and rise or fall based on how much you sell. Indirect costs like rent, marketing, and administrative salaries are not included in COGS because they support the business as a whole.

How does COGS affect my business’s profitability?

COGS directly reduces your gross profit. When COGS increases without a matching increase in price, your margins shrink. Tracking COGS helps you understand whether you’re pricing your products correctly, whether supplier costs are rising, and whether you’re managing inventory efficiently. If COGS becomes too high, your business may struggle to cover operating expenses or generate profit.

Are salaries included in COGS?

Only direct labor is included in COGS. This refers to employees who actively produce the goods or prepare items for sale, such as bakers, cooks, production workers, or assembly staff. Salaries for managers, administrative staff, cashiers, or general employees are considered operating expenses, not COGS, because they aren’t tied to producing a specific product.

How does inventory impact COGS?

Inventory is central to the COGS formula. Beginning inventory and purchases show what you had available to sell, while ending inventory shows what’s left over. The difference represents the cost of the products actually sold during the period. Inaccurate inventory counts lead to inaccurate COGS, which can distort your gross profit and make it harder to understand how your business is performing. Inventory methods like LIFO and FIFO also affect how costs are assigned to COGS.

How often should I calculate cost of goods sold?

Most businesses calculate COGS at the end of each accounting period, such as monthly, quarterly, or annually. Retailers and restaurants that closely monitor margins may calculate it more frequently, especially when prices or demand fluctuate. Regular calculation helps you spot changes in costs, manage pricing, and make timely decisions about inventory and profitability.

Eric Rosenberg
Eric Rosenberg is a financial writer, speaker, and consultant based in Ventura, California.

Related

Keep Reading

Tell us a little more about yourself to gain access to the resource.

i Enter your first name.
i Enter your last name.
i Enter a valid phone number.
i Enter your company name.
i Select estimated annual revenue.
i This field is required.
✓

Thank you!
Check your email for your resource.

x
Results for

Based on your region, we recommend viewing our website in:

Continue to ->