How to Calculate the Cost of Goods Sold

If you own an inventory-based business, calculating your cost of goods sold (COGS)—also known as the cost of sales—is a crucial part of understanding your profit and loss.

We are committed to sharing unbiased reviews. Some of the links on our site are from our partners who compensate us. Read our editorial guidelines and advertising disclosure.

Play Video

Want to know if your inventory-based business is turning a profit? You need to determine your cost of goods sold, or COGS. Calculating your cost of goods sold tells you how much it costs to create a product—so if you know your COGS, you know what price to sell your goods at to turn a profit.

If you're ready to dive right in, here's the COGS formula:

Cost of goods sold = beginning inventory + purchases – ending inventory

Of course, rather like the pure and simple truth, easy mathematical equations are rarely easy and never simple. Keep reading for our breakdown of each part of the COGS formula.

Understanding the COGS formula

Before you can calculate your cost of goods sold, you need to gather information on three crucial figures over a given time period:

  • Your beginning inventory, which is the total worth of all the inventory you have on hand at the start of the time period (including raw materials for not-yet-assembled goods, among other things)
  • The total cost of purchases made over that time period, which refers to any new inventory and materials you purchased plus any other direct expenses (expenses directly related to product creation)
  • Your ending inventory, or the total worth of your remaining inventory at the end of the time period

The time period you pick is up to you, but we recommend calculating your cost of goods sold at least quarterly. Running the formula once a month is a great way to stay on top of inventory costs—a particularly good idea if you've just gotten your business up and running. And you'll need to calculate your yearly COGS to accurately file your taxes at the end of the year.

Beginning inventory

Own a retail business? Determining your beginning inventory's value shouldn't be too complicated. For example, if you were a fabric store owner, you'd know exactly how much you paid your supplier for each bolt of cloth or skein of yarn. You'd simply add up how much it cost to acquire each product and, voilà, you've found your beginning inventory's total value.

If you don't just sell goods but also assemble raw materials to create goods, your inventory will include all the building blocks that make up your final product. For example, if you own a smoothie food truck, the cost of your frozen fruit would count as inventory.

Purchases

Your purchases section should include all direct expenses, or expenses that relate directly to production. Common direct expenses include the following:

  • Wholesale inventory purchased during the time period
  • Parts and materials
  • Direct labor costs, or the wages you pay employees who assemble your products

If you can't directly tie a cost to product creation, it's an indirect cost that isn't included in your total purchases column. For instance, administrative costs (like board member salaries) are indirect costs that don't relate to the COGS formula. (You'll record indirect costs on your income statement, but again, they aren't relevant to calculating COGS, so feel free to set them aside for now.)

Ending inventory

Calculate your ending inventory using the same guidelines we outlined in the beginning inventory section above.

Alas, if this is the first time you're running a COGS formula, you'll have to calculate both your beginning and ending inventory. But from this point forward, you'll need to calculate only your ending inventory. Why? Because one period's ending inventory will always equal your beginning inventory for the next period.

Expert Advice, Straight to Your Inbox
Gain confidence in your business future with our weekly simple solutions newsletter.

By signing up I agree to the Terms of Use and Privacy Policy.

Applying the COGS formula

COGS is an essential part of your company's profit and loss statements, one of the most crucial financial documents for any growing business. Profit and loss statements, which are also called income statements, list your revenue and expenses to calculate your net profit.

In turn, the net profit shows you, your investors, and other financial stakeholders (like banks) exactly how financially healthy your business is—which influences who invests in your business and how much.

A basic profit and loss statement has two main sections:

  • Revenue, which usually refers to profits from sales of goods or services
  • Expenses, which include wages for direct labor, equipment purchases, rent, and (for inventory-based businesses) COGS

At the bottom of the sheet, you'll subtract your expenses from your revenue to list your net profit.

Multi-step profit and loss statements are a little more complicated. Instead of listing COGS as an expense, these types of statements deduct COGS directly from sales revenue to calculate the business's gross profit. The statement then divides expenses into operating expenses (OPEX) and non-operating expenses.

Get the skinny on income statements
Bell

Income statements are one of the three most important financial documents in your repertoire—and learning how to draw one up is a crucial step in understanding your business's financial trajectory. To get more info on how to build your own report, check out our page on how to prepare an income statement.

Cost of goods sold FAQ

Does my business need to calculate COGS?

The cost of goods sold applies only to businesses that sell products. If your business is service based (like a psychology clinic or legal team), your direct costs don't come from sales of goods. Instead, your direct costs are any expenses related directly to your service. For instance, an outsourced accounting company would likely include its accounting software subscription as part of its direct costs.

What is the formula for COGS?

The formula for calculating COGS is beginning inventory + purchases – ending inventory.

What costs are included in the cost of goods sold?

Any costs that directly relate to selling your product should be considered part of your cost of goods sold. For example, if you pay employees to assemble your product, both the product's raw materials and the employees' wages are included in your cost of goods sold. These expenses are also known as direct expenses since they relate directly to your product's creation.

Best Bookkeeping Software
Xero
Best for freelance
Wave
Budget pick
Learn more about our top brands.

The takeaway

Nothing beats the peace of mind you get from knowing exactly where your business stands financially—and if you own an inventory-based business, calculating your cost of goods sold is a crucial part of that financial serenity. Make sure to run the equation frequently to ensure your business is comfortably in the black or, if not, show you what changes you need to make to boost your profitability.

Want help tracking your business's finances? All five of our favorite small-business accounting solutions include detailed reporting that keeps you up to date on COGS and other key financial calculations.

Compare the best bookkeeping software for small businesses

Bookkeeping software
Starting price
User limit (basic plan)
Expense tracking (basic plan)
Key reports
Get started
$15.00/mo.* 1 user + accountant access
Icon Yes  DarkYes
Sales tax, accounts receivable, inventory
$13.00/mo.Unlimited users
Icon No  DarkNo
Customized performance tracking
$0.00/mo.**Unlimited users (addt'l fee)
Icon Yes  DarkYes
Sales reports by customer, sales rep, or item
Free for lifeUnlimited users
Icon Yes  DarkYes
Basic financial reports only
$10.00/mo.1 user + accountant access
Icon Yes  DarkYes
Cash flow forecasting

Data as of 3/20/23. Offers and availability may vary by location and are subject to change.
*Current promotion: 50% off for three months or 30-day free trial
**Available only for businesses with less than $50K USD in annual revenue

Disclaimer

At Business.org, our research is meant to offer general product and service recommendations. We don't guarantee that our suggestions will work best for each individual or business, so consider your unique needs when choosing products and services.

Kylie McQuarrie
Written by
Former Business.org staff writer Kylie McQuarrie has been writing for and about small businesses since 2014. Her work has been featured on SCORE.org, G2, and Fairygodboss, among others. She's worked closely with small-business owners in every industry—from freelance writing to real-estate startups—which has given her a front-row look at small-business owners' struggles, frustrations, and successes.
Recent Articles
Best-Payroll-Software-for-Small-Business-on-laptop-screen
Best Payroll Software for Small Business 2023
We looked at 20 of the most popular payroll programs in the US, to rate...
A black male waiter serves a group of black and white women eating at a restaurant
The 9 Best Payroll Software for Restaurants 2023
We looked at and assessed the top payroll brands’ prices, plans, payroll and HR features,...
A Black woman in a pink sweater sits at a table calculating sums
Gusto Payroll Review 2023
In our Gusto review, we dive into pricing, payroll and HR features, customer reviews, and...
male using ipad on an abstract background
The 5 Best Payroll Apps for Small Business 2023
Constantly on the go? Get one of our top payroll mobile apps so you’ll always...