Business News Daily receives compensation from some of the companies listed on this page. Advertising Disclosure
BND Hamburger Icon


BND Logo
Search Icon
Updated Feb 23, 2024

How to Calculate Cost of Goods Sold

Cost of goods sold (COGS) is an important part of accounting that gives insight into your profitability.

author image
Dock Treece, Business Strategy Insider and Senior Writer
Verified Check With BorderEditor Reviewed
Verified Check With Border
Editor Reviewed
This guide was reviewed by a Business News Daily editor to ensure it provides comprehensive and accurate information to aid your buying decision.

Table of Contents

Open row

They say you have to spend money to earn money and that’s true — all the items your business sells cost money to acquire. Smart business financial management means accounting for these expenses alongside your earnings. In almost all cases, the metric cost of goods sold (COGS) is the best way to measure these expenses. Below, you’ll learn how to calculate COGS, including automatically via accounting software.

[Related Read: Choosing the Right Small Business Accounting Software]

What is COGS?

COGS is a company’s direct cost of inventory sold during a particular period. It includes all costs directly allocated to the goods or services sold in a given week, month or year. However, it excludes any indirect or fixed costs, such as overhead and marketing. It only accounts for the cost to purchase or manufacture inventory sold in a given time frame.

Formula for COGS

While COGS focuses, obviously, on cost, the metric is calculated in a roundabout way. Instead of totaling the COGS directly by totaling inventory expenses, COGS is calculated by comparing the costs of beginning and ending inventory and then adding the cost of inventory acquired and sold in the same period. In other words, the formula focuses on the time frame rather than expenses.

COGS = Beginning Inventory + Purchases – Ending Inventory

Of course, the formula for COGS also gets a bit more complex if you’re doing your own manufacturing. In that case, your beginning inventory would be the cost to create that inventory, your purchases would be the direct cost to manufacture more during the period and your ending inventory would be the direct cost of unsold goods.

Key TakeawayKey takeaway
COGS measures how much you spent on goods your business sold in a given period but does not account for overhead expenses like marketing costs.

COGS example

Let’s say there’s a retail store that starts the year with a certain inventory in stock. The inventory has a retail value of $60,000 and costs the store owners $30,000 to acquire.

Now, let’s say that over the ensuing year, the store owners purchase $100,000 of additional inventory with a total retail value of $225,000. At the end of the year, the store has a remaining inventory worth $40,000, which cost $20,000 to acquire.

The store’s owners could use COGS to determine their total cost of inventory sold over the year — a key number in determining their overall profitability for the year. The calculation would be as follows.

COGS = $30,000 + $100,000 – $20,000 = $110,000

In this case, the total COGS for the year would be $110,000. The store’s gross margin for the period — the gross sales for the year minus COGS — would be equal to $135,000 ($60,000 + $225,000 – $40,000 – $110,000).

Importance of COGS in accounting

In business accounting, calculating the COGS is critical for determining the profitability of a company (as seen on a profit and loss statement), department or product line. It’s an essential metric for companies tracking the direct costs of their business inventory. It also makes it easier for managers to identify potential cost-saving measures, including ways to save on inventory costs.

In addition to reducing wholesale costs, tracking COGS is a good way for businesses to optimize their inventory ordering (reducing ordering costs), measure inventory turnover and minimize inventory holding costs.

Did You Know?Did you know
COGS is an important element for maximizing your business’s tax deductions. Ordinary and necessary business expenses are considered part of COGS and usually can reduce a business’s tax liability.

What does COGS tell you?

COGS reveals to business owners and managers the total direct costs of their products or services sold over a certain period. This allows companies to calculate their gross profit margin on sales made during a period and is one step toward determining the company’s net profit.

While COGS is a critical measure of a company’s direct costs, it doesn’t tell managers anything about indirect costs — things such as company overhead, salaries for back-office personnel, marketing budgets and office supply expenses.

COGS vs. expenses

While the COGS is a business expense, it’s only a portion of a company’s expenses — specifically, it’s only the direct expenses of a company’s goods or services sold during a particular period. As mentioned above, COGS doesn’t include indirect costs like overhead, utilities and marketing.

Once it’s calculated, COGS is deducted from a business’s gross revenue to determine its gross margin. Other expenses are then deducted to calculate the business’s net profits. So, while COGS are expenses, they’re usually accounted for separately from other expenses (whenever possible) to give a company’s owners and managers the most detailed picture of the business’s finances.

Limitations of COGS

Although COGS can help businesses monitor their direct costs and identify cost-saving measures, it also has limitations. COGS doesn’t show a company’s true cost of selling since it doesn’t include expenses like marketing. Because COGS doesn’t include fixed costs, it also doesn’t provide a true reflection of a business’s profitability. For an accounting method that includes fixed expenses, consider cost accounting.

Some other limitations of COGS include the following:

  • True COGS can vary widely per unit sold.
  • COGS fluctuates based on the volume of sales in each product line.
  • COGS may fluctuate across periods, even when sales are level, depending on the accounting method a company uses.
  • Managers need to be very attentive to understand their COGS.
  • The impact of COGS on a company’s profitability isn’t always immediately clear.

So, while COGS is an important metric, it’s far from a complete indication of a company’s total cost of doing business. While it’s often listed first on a company’s income statement or cash flow statement, in reality, there are other costs that have to be paid and accounted for — whether a company has any sales or not.

Inventory accounting methods and COGS

While there’s only one formula for calculating COGS, companies can choose from several different accounting methods to find their specific cost. Each method is a different way of calculating the cost of the specific items sold in a given period.

In practice, there are at least four accounting methods for determining COGS. Companies can choose from any of these, but they need to be consistent once they choose. And while it can be difficult for companies to decide, which method they use can have a considerable impact on profitability, as well as tax consequences.

Regardless of which method you use, the best accounting software makes it easy to incorporate COGS into your business accounting processes. Some software can even help you decide on an inventory accounting method by showing which is most advantageous for you. Learn more about the different methods below and keep reading for our accounting software recommendations.

[Read Related: Net vs. Gross Income]


First in, first out (FIFO) is an accounting method that assumes the longest-held inventory is what’s sold first whenever a company makes a sale. So, if a company paid $5 per unit a year ago, and it pays $10 per unit now when it makes a sale, the COGS per unit is said to be $5 per unit until all of its year-old units are sold.

While the FIFO method can have inventory management advantages for some businesses (such as making it easier for companies to monitor inventory turnover), it can also create higher tax liability if a company’s inventory costs are consistently on the rise.


Last in, first out (LIFO) is a method that considers the most recently purchased items in a company’s inventory to have sold first. So, if a company paid $5 per unit a year ago and pays $10 per unit now, each time it makes a sale, the COGS per unit is said to be $10 until all of its more recently purchased units are sold.

The LIFO method can offer companies significant tax advantages, especially for businesses that maintain large and valuable inventories. But if a company drastically sells down its inventory in a particular period and sells some of its “cheapest” inventory — and prices have risen since the inventory was acquired — that can cause outsized tax bills for a particular year.


The averaging method for calculating COGS is a technique that doesn’t consider the specific cost of individual units. It also doesn’t matter what was purchased when or how inventory costs fluctuate. Instead, businesses using the averaging method establish an average per unit cost and then multiply that average by the number of units sold during a particular period to determine COGS.

The average method is attractive because it’s a happy median between the FIFO and LIFO methods. It’s not the most advantageous calculation for tax purposes, but it’s not the worst, either. It’s also relatively easy to apply and use consistently.

Specific identification

The specific identification method is an accounting method that allows companies to assign specific values to individual units sold in a particular period. This technique can be ideal for businesses that sell custom goods or services or those with inventory that varies widely in value — a shop that sells valuable antiques, for instance.

Without the specific ID method, COGS for businesses like these would fluctuate wildly based on what they sell in a particular period. The specific identification method helps them total their COGS more accurately for a given period and can make their tax liability much more predictable.

[Related: What Are Accounting Reports?]

Discuss your company's circumstances with a certified public accountant to determine which accounting method is best for you. Their expertise will ensure you choose the most effective method for your business.

Best accounting software for calculating and tracking COGS

Regardless of the specific accounting method you use, we recommend taking advantage of the below accounting software solutions for COGS management:

  • QuickBooks: With QuickBooks, you can create an account to track your inventory values and then a COGS account. You can also link your individual inventory items to the COGS account you’ve created and choose between the FIFO and LIFO methods for the relevant calculations. Find out more about this program via our Intuit QuickBooks accounting software review.
  • ZarMoney: Through ZarMoney, you can view your inventory counts, individual items, sales history and purchase history. The platform also offers in-depth reports and insights, putting data and visuals to your COGS management. Explore this software’s additional inventory and finance management features in our ZarMoney review.
  • Zoho Books: This vendor’s two highest-priced packages include advanced inventory management. Couple this feature with the COGS accounts you can create in this program and you’re all set to track and manage your inventory spending. Read our Zoho Books review to learn more.
  • Oracle NetSuite: If you use Oracle NetSuite for both accounting and inventory management, the platform will track your COGS. You’ll also see the expenses involved in buying or selling your products in your general ledger. Visit our Oracle NetSuite review to check out this enterprise resource planning (ERP) platform’s other accounting features.

From acquiring to selling

Buying the inventory you’ll eventually sell is an inevitable cost of running your business, but smart COGS management makes a difference. Run reports detailing your COGS in the context of related metrics and you might see ways to lower your inventory costs. You’ll do this while keeping inventory flowing into your business — meaning you’ll operate how you always have but with lower expenses. That’s a sure-fire route to earning more revenue and achieving sustainable success.

Max Freedman contributed to this article.

author image
Dock Treece, Business Strategy Insider and Senior Writer
Dock David Treece is a finance expert who has extensively covered business financial topics, including Small Business Administration (SBA) loans and alternative lending. He is the Senior Vice President of Marketing at BNY Mellon and the former Editorial Manager at Dotdash. He also previously worked as a financial advisor and registered investment advisor, as well as served on the FINRA Small Firm Advisory Board. Dock brings more than 17 years of experience, including his time as an entrepreneur co-founding and managing a small business. His entrepreneurial background gives him firsthand insight into the challenges small business owners face and the tools and tactics they can use to succeed.
Back to top
Desktop background imageMobile background image
In partnership with BDCBND presents the b. newsletter:

Building Better Businesses

Insights on business strategy and culture, right to your inbox.
Part of the network.