An easy cost of goods sold (COGS) calculation guide

Quickly master how to calculate cost of goods sold (COGS) with clear formulas, real-world examples, and tips to sharpen your pricing and profitability.
Author
Rho editorial team
Updated
Read time
7

Key takeaways

  • Cost of Goods Sold (COGS) measures the direct costs tied to producing or acquiring products, impacting profitability and pricing strategies.
  • Calculating COGS accurately requires tracking beginning inventory, purchases, and ending inventory, while excluding indirect expenses.
  • Automating COGS calculations improves accuracy, streamlines financial reporting, and supports better operational decisions.

If you're managing a startup or scaling your business, understanding your profit margins starts with knowing your costs well—and that begins with calculating your cost of goods sold (COGS). Whether you’re setting product prices, filing taxes, or evaluating profitability, COGS is a foundational metric. But how do you compute it accurately? 

In this guide, we'll clearly explain how to calculate COGS, what costs to include (and exclude), common mistakes to avoid, and practical examples to help you stay profitable and operationally efficient.

What is the cost of goods sold (COGS)? 

Cost of Goods Sold (COGS) is the total direct cost incurred by a business to produce or acquire the products it sells. It includes expenses such as raw materials, direct labor, and manufacturing overhead—costs directly tied to product creation or purchasing.

It’s also sometimes referred to as:

  • Cost of sales
  • Direct costs

It’s prominently displayed on your income statement, influencing your gross profit and tax liabilities–but you can easily calculate it too.

Businesses frequently refer to their COGS when analyzing financial performance and operational efficiency. That's why understanding and accurately calculating COGS is so essential because it directly impacts your business’s profitability and informs pricing and inventory management decisions.

The basic cost of goods sold formula

If you need to calculate this from scratch or want to understand this concept better, here's an easy COGS formula:

COGS = Beginning Inventory + Purchases – Ending Inventory

Here’s an easy-to-follow example:

  • Beginning inventory: $50,000
  • Purchases during the period: $120,000
  • Ending inventory: $40,000

Putting it all together:

COGS = $50,000 + $120,000 – $40,000
COGS = $130,000

Step by step: How to calculate COGS

Know what counts as inventory or purchases? Let’s unpack each step of the formula and the components that typically go into it:

1. Identify your beginning inventory

This is the total monetary value of inventory your business holds at the start of your accounting period (month, quarter, year). It includes:

  • Finished goods ready for sale.
  • Raw materials awaiting use in production.
  • Inventory storage costs associated with these items.

2. Add your total purchases

These are all additional costs directly related to acquiring or producing inventory during the current period. Purchases include:

  • Raw materials or components purchased for production.
  • Direct labor, such as wages for workers directly involved in production (not administrative salaries).
  • Manufacturing overhead such as factory rent, machinery depreciation, utilities directly related to production.
  • Costs of products bought specifically to resell.

3. Determine your ending inventory

Finally, your ending inventory is the value of unsold products or materials left at the end of the accounting period. You typically find this number by conducting a physical inventory count or using an inventory management system.

What's typically excluded in COGS?

There’s an important distinction to note here—COGS should only reflect costs directly tied to producing or acquiring goods

Expenses not directly involved in production, such as general business operations or selling activities, should not be part of your COGS calculation.

Costs that are not included in COGS:

  • Administrative salaries: These relate to general management, not production.
  • Sales and marketing expenses: They focus on selling goods, not creating them.
  • Distribution and shipping costs: Typically, these occur after production is completed and relate to delivery, not manufacturing.
  • Office supplies and overhead: General business expenses unrelated directly to making or purchasing inventory.

When in doubt, ask: “Was this expense necessary to create the product itself?” 

If not, classify the cost as an operating expense.

Because they're not directly involved in the creation or purchase of your products, excluding them ensures your COGS accurately reflects true production efficiency.

Why businesses regularly calculate COGS

Businesses typically calculate COGS for each accounting period, or may even make regular recalculations for accuracy. This is important because inventory levels and direct costs frequently fluctuate.

However, once calculated and clearly listed on financial statements—particularly the income statement—businesses often refer back to it repeatedly for strategic decisions.

Knowing your COGS can help you massively with:

  • Evaluating profitability
  • Determining pricing strategy
  • Managing inventory efficiently
  • Making informed operational and strategic financial decisions

Where is COGS found on your financial statements?

Apart from calculating this value, you'll likely be able to find the cost of goods sold prominently on past financial documents as well.

In your income statement, COGS appears just below the revenue line. Calculating sales minus COGS also gives you your gross profit.

For example:

Revenue: $100,000

COGS: $40,000

Gross Profit: $60,000

Additionally, you'll likely be able to reference your COGS details indirectly in other financial documents like the balance sheet under inventory assets or in detailed notes accompanying financial statements.

How automation can improve COGS accuracy

If you’ve ever pulled together a COGS calculation manually, you know it can be a messy process—especially as your business grows. You're tracking down inventory values, matching purchase orders, categorizing expenses... and hoping nothing slipped through the cracks.

In most businesses, the finance or accounting team handles COGS. They rely on data from inventory systems, procurement tools, and time tracking to piece together the full picture. But when those systems don’t talk to each other—or when things are tracked in spreadsheets—it’s easy for mistakes to happen or for costs to get misclassified.

That’s where automation makes a real difference.Modern finance automation tools can:

  • Sync real-time inventory and purchase data from across systems so you’re always working with the most up-to-date numbers.
  • Flag unusual cost changes—like a supplier price hike or unexpected spike in raw materials—before they distort your financials.
    Automatically separate direct vs. indirect costs, so only the right expenses get included in your COGS.
  • Generate audit-ready reports that make financial reviews, tax prep, and investor reporting a whole lot easier.

Examples of leading automation platforms that can do this include QuickBooks Online, NetSuite, Sage Intacct, and Microsoft Dynamics 365. Plus, you can integrate Rho directly with all of them—so your financial data flows cleanly, without the manual work.

Connecting COGS with broader cost accounting practices

Accurately calculating your cost of goods sold is fundamental—it shapes your pricing, profitability, and growth potential. But numbers are only part of the story. Streamlining how you manage those costs and your business expenses is equally critical. That’s where Rho fits in.

Rho integrates with platforms like QuickBooks, NetSuite, Sage Intacct, and Microsoft Dynamics 365—so your financial data flows seamlessly across systems. That means less manual work, cleaner books, and more accurate reporting for things like COGS.

Alongside those integrations, Rho brings together:

  • Expense management
  • Corporate cards
  • Cash and treasury management
  • Accounts payable automation

By connecting these workflows in one intuitive platform, Rho helps finance teams stay lean, agile, and in control of their numbers.

Ready to streamline your financial operations? Explore how Rho can empower your business today.

Rho editorial team
April 25, 2025

Simplify expense management

Spending made smarter

Eliminate late receipt submissions and streamline transaction reconciliation with Rho.

Eliminate annoying banking fees, earn yield on your cash, and operate more efficiently with Rho.

Scale your startup with Rho today

Book time to see the Rho platform in action with one of our startup specialists.
Learn more
*Rho is a fintech company, not a bank or an FDIC-insured depository institution. Checking account and card services provided by Webster Bank N.A., member FDIC. Savings account services provided by American Deposit Management Co. and its partner banks. International and foreign currency payments services are provided by Wise US Inc. FDIC deposit insurance coverage is available only to protect you against the failure of an FDIC-insured bank that holds your deposits and subject to FDIC limitations and requirements. It does not protect you against the failure of Rho or other third party.
The Rho Corporate Card is issued by Webster Bank N.A., member FDIC pursuant to a license from Mastercard.
Investment management and advisory services provided by RBB Treasury LLC dba Rho Treasury, an SEC-registered investment adviser and subsidiary of Rho. RBB Treasury LLC facilitates investments in securities: investments are not deposits and are not FDIC-insured. Investments are not bank guaranteed, and may lose value. Investment products involve risk, including the possible loss of the principal invested, and past performance does not future results. Registration with the SEC does not imply a certain level of skill or training. Treasury and custodial services provided through Apex Clearing Corp. ("Apex") and Interactive Brokers LLC ("Interactive"), registered broker dealers and members FINRA/SIPC. Interactive rates may vary from Apex rate shown above. For additional information about investment management and advisory services provided by Rho Treasury, please refer to Rho Treasury’s ADV-2A Wrap Fee Brochure.
             
This material presented is for informational purposes only and should not be construed as legal, tax, accounting or investment advice. Under no circumstances should any of this material be used for or considered as an offer to sell or a solicitation of any offer to buy an interest in any securities. Any analysis or discussion of financial planning matters, investments, sectors or the market generally are based on current information, including from public sources, that we consider reliable, but we do not represent that any research or the information provided is accurate or complete, and it should not be relied on as such. Our views and opinions are current at the time of publication and are subject to change. You should consult with your attorney or relevant professional advisor for advice particular to your personal or business situation.
                  
Rho Treasury is not insured by the FDIC. Rho Treasury are not deposits or other obligations of Webster Bank N.A., or American Deposit Management Co.’s partner banks, and are not guaranteed by Webster Bank N.A., or American Deposit Management Co.’s partner banks. Rho Treasury products are subject to investment risks, including possible loss of the principal invested.
*This reflects the gross yield based on 90-day Treasury Bill rates as of [DATE]. The advertised yield does not include the annual fee, which ranges from 0.15% for deposits of $20M or more to 0.6% (the maximum annual fee) for deposits under $2M. Individual results may vary depending on the actual investment date and investment products selected. Past performance is not a guarantee of future performance results. The yield is variable and fluctuates without prior notice. The rate shown is before fees. Fees and costs may reduce the actual returns received. The amount of Treasury Bills available at a particular yield will depend upon the sellers’ offer size; any remaining cash balance after the purchase may not earn the same yield.
© 2019-2025 Under Technologies, Inc. DBA Rho Technologies. Rho is a trademark of Under Technologies, Inc.