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.