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?
You may have heard of the accounting term "cost of goods sold" (COGS). This guide breaks down what you need to know about this important metric and how to calculate it.
by Eric Rosenberg Dec 22, 2025 — 8 min read
What Is Cost of Goods Sold (COGS) and How Do You Calculate It?
This article is intended for informational purposes only and does not constitute legal or financial advice or an opinion on any issue.

When you run a business that sells any product or service, the cost of goods sold (COGS) is an essential metric. Understanding how it works and how it impacts the financial performance of your business is vital for any business owner or manager.

This guide breaks down what you need to know about COGS, including a cost of goods sold formula to help you make better decisions that improve your long-term business outcomes.

What is cost of goods sold (COGS)?

The 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 labour related to producing or selling the goods.

In other words, the materials that go into the product and the labour of making each unit may be included in cost of goods sold. 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?

Cost of goods sold includes all of the direct costs required to produce, acquire, or prepare an item for sale. These are expenses that can be traced back to a specific product and rise or fall based on how much you sell. 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:

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 labour 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 number for business owners and managers to track. Any additional margin goes back to covering overhead and eventually profit. If you don’t know your COGS and break-even point, you don’t know if you’re making or losing money.

COGS is also an important metric on financial statements, as accountants subtract it from a business’s revenues to determine gross profit, which tells you how efficient your company is at managing production costs and also gives investors more insights into your core profitability before variable expenses like marketing or admin are factored in. This information can be used as a benchmark to compare your business to others in the same industry and gauge scalability.

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 labour costs, you can include those as well, but that may not apply to all businesses.

Here’s what each part means:

 

Once you’ve determined which costs roll into your inventory costs, inventory valuation methods like LIFO and FIFO help you assign different values to different batches of products.

LIFO method

LIFO means “Last In, First Out.” This inventory valuation method assumes that the last item purchased or produced is the first item sold. When calculating COGS with LIFO, you’d use this formula first to determine inventory costs:

(Cost of Most Recent Inventory x Quantity Sold From that Batch) + (Cost of Older Inventory x Quantity Sold From that Batch)

For example, let’s say that a business has 100 units purchased at $50 in November and 100 units purchased at $60 in December. If the business resells 120 units by the end of the year, LIFO assumes that the first 100 cost $60 and that the remaining 20 cost $50. The COGS would be (100 x 60) + (20 x 50) = $7,000.

Note that LIFO isn’t accepted by the Canada Revenue Agency (CRA) for income tax purposes as a method of determining cost. This is because if the most recent (and likely the most expensive) stock is recorded as sold first, it results in a higher COGS – which means less gross profit and less taxable income. A business using LIFO in times of inflation could, in theory, still sell older stock that was produced at a lower cost while claiming the higher cost of newer goods.

FIFO method

FIFO means “First In, First Out” and it’s the exact opposite of LIFO. It assumes that the first item purchased or produced is the first item out, which follows the natural flow of inventory, as businesses tend to want to get rid of older stock first. When calculating COGS with FIFO, you’d use this formula first to determine inventory costs:

(Cost of Oldest Inventory x Quantity Sold From that Batch) + (Cost of Next Inventory Batch x Quantity Sold From that Batch)

Unlike the LIFO inventory valuation method, FIFO is permitted by the CRA and is commonly used in Canada.

Cost of goods sold examples

Public companies are required by law to share their cost of goods sold information in their annual reports, so you can always look at cost of goods sold, or cost of sales, for any company listed on the Toronto Stock Exchange (TSX).

Here’s a hypothetical example for a small business, calculated using the standard cost of goods sold formula:

 

Here’s another example, calculated using the FIFO formula for inventory:

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:

Using cost of goods sold to improve profitability

Large companies hire teams of accountants and financial planning and analysis (FP&A) analysts to review every cost with a fine-tooth comb. While you may want to seek professional support, you can do your own calculations and still find opportunities to improve through your own COGS analysis.

Businesses that use Square have quick access to this information through 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. For example, you can:

 

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 the costs directly associated with making or acquiring the products you sell. It can include raw materials, direct labour costs, factory overheads such as utilities, rent, maintenance, depreciation and manufacturing supplies, freight-in costs and goods purchased for resale.

If you’re unsure about whether a cost falls under COGS, ask yourself: ‘Does this cost only exist because I’m making or acquiring a product to sell?’ If the answer is yes, it might fall under COGS.

How does COGS affect my business’s profitability?

Yes, COGS affects your gross profit, which is what’s left after you’ve covered the costs of making your products. The higher your COGS, the lower your gross profit, which gives you less bandwidth to pay for overhead expenses such as marketing or admin while still making a profit. Understanding COGS can help you make smarter decisions, like choosing prices that help you maintain healthy margins.

Are salaries included in COGS?

Some salaries are included in COGS, but only for employees that are directly involved in the production of your product, such as line workers. The salaries of team members who work in supporting roles, like sales reps or HR coordinators, don’t fall under COGS and are considered operating expenses.

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 FIFO also affect how costs are assigned to COGS.

How often should I calculate cost of goods sold?

Since COGS is included in a business’s profit and loss (P&L) statement, you need to calculate it at least once a year as part of your annual tax filing requirements. But there are benefits to tracking COGS more often, like monthly or quarterly, since it can help you monitor profitability and make adjustments as necessary.

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 ->