How to calculate cost of goods sold (COGS) for your small business

Quick insights
- Cost of goods sold (COGS) refers to the direct costs involved in producing or purchasing products that a business sells.
- Calculating COGS can help business owners set accurate pricing, evaluate profitability and prepare for tax season.
- There are many accounting methods and business metrics that use COGS in their calculations.
Are you making a profit on every item you sell, or are hidden costs eating into your margins? Calculating your cost of goods sold (COGS) is more than just a required accounting task—it is an important metric that can help you gauge your business’s financial health.
Understanding exactly what goes into COGS and how to use that information can help you to alleviate pricing anxiety, optimize your inventory and make informed decisions that protect your bottom line. Note that you may want to consult with an accounting professional about your specific situation.
Let’s dive into COGS, how to calculate it and when to use it.
What is COGS?
Cost of goods sold, commonly known as COGS, represents the direct costs associated with producing or purchasing the products your business sells during a specific period. This figure includes expenses directly tied to the product, such as raw materials and direct labor, but strictly excludes indirect costs like marketing or administrative expenses.
COGS is a key metric for businesses that sell physical products, whether you’re manufacturing items, buying wholesale goods for resale, or both. Knowing your COGS may offer a clear view of how much it costs to create or purchase the goods you sell, and it can play an important role in determining your gross profit.
Why is knowing COGS important for business owners?
Understanding COGS can be useful for business owners for several reasons. First, it helps to ensure your pricing strategy is accurate. If you don't know your true costs, you may risk underpricing your items and losing money on each sale.
COGS also directly influences your business’s tax liability. Because COGS is deducted from your revenue to calculate gross profit, it impacts your taxable income. Furthermore, tracking COGS over time helps you spot trends—like rising supplier costs—allowing you to adjust inventory practices as needed.
For those with plans to apply for a business loan or business line of credit, maintaining accurate COGS records may help support your loan application, as lenders use this metric to evaluate your operational efficiency.
What is included in the COGS calculation?
Calculating COGS involves a few direct costs related to your products. Key components to consider for an accurate COGS calculation often include:
- Inventory purchases: This is the wholesale cost paid to buy inventory intended for resale.
- Raw materials: The cost of materials used in manufacturing products are your raw materials costs.
- Direct labor: These costs are the wages paid to employees who directly manufacture or assemble products.
- Factory overhead: Factory overhead expenses are directly tied to production, such as utilities for manufacturing equipment or custom product packaging.
- Shipping and freight: These are the costs for getting raw materials or wholesale inventory shipped to a facility.
How direct vs. indirect costs relate to COGS
Understanding the difference between direct and indirect costs can assist with accurately calculating COGS.
- Direct costs are expenses tied directly to producing or purchasing products, such as raw materials, wholesale inventory and direct labor. These are the costs that factor into calculating COGS.
- Indirect costs are the overhead expenses required to run a business, like monthly storefront rent, utilities and marketing campaigns. These are generally excluded from the COGS calculation.
Keeping these costs separate can help with setting accurate prices and may allow business owners to see if a core product is profitable before overhead is factored in. It can also help support compliance with IRS rules.
How to calculate COGS
Calculating COGS involves a specific formula that helps you determine the direct costs for a given period. Here’s how it works:
COGS formula:
Beginning inventory + Purchases during the period – Ending inventory = COGS
Let’s break down each component:
- Beginning inventory: The value of inventory on hand at the start of the period
- Purchases during the period: The total cost of products or materials bought during the period
- Ending inventory: The value of inventory remaining at the end of the period
For example, if a business started the year with $10,000 of inventory, bought $25,000 of additional inventory and ended the year with $8,000 of inventory, the COGS would be:
$10,000 + $25,000 – $8,000 = $27,000 COGS
Accounting methods that use COGS
The way you calculate COGS may depend on your inventory accounting method. Common methods include:
First-In, First-Out (FIFO)
FIFO is an accounting method that assumes the first items added to your inventory are the first ones sold, mirroring how most physical products move. Because prices generally rise over time, FIFO calculates your COGS using your oldest, lowest costs. For small business owners, this results in a lower COGS and a higher reported profit, which looks great to lenders but may also increase your end-of-year tax liability.
Last-In, First-Out (LIFO)
LIFO assumes that your most recently purchased inventory is sold first. Under LIFO, your COGS is calculated using the cost of your newest, often more expensive inventory. For small business owners facing rising supplier costs, this higher COGS reduces reported profit, which may lower taxable income and save money during tax season.
Weighted average cost
The weighted average cost method calculates your COGS by dividing the total cost of all available inventory by the total number of units. This approach blends the costs of older, cheaper inventory with newer, more expensive items to create a middle-ground COGS. It is often a simpler, time-saving method for small business owners who sell large volumes of identical items.
Specific identification
Specific identification tracks the exact purchase price of every single item in inventory. This method is often used by businesses selling unique, high-value or custom items to provide a detailed picture of profitability per item. It tends to provide a more accurate picture of profitability per item (though it may require meticulous record keeping).
Business metrics that use COGS
COGS is used in several common business metrics. These metrics can often help business owners get a better sense of business profitability, margins and turnover.
Some common metrics that include COGS analysis include:
- Gross profit: Gross profit is the raw dollar amount you have left over after subtracting your cost of goods sold from your total sales revenue. It is the direct mathematical result of your COGS, meaning that if your revenue stays the same but your COGS increases, your gross profit shrinks.
- Gross margin: Gross margin represents your gross profit expressed as a percentage of your total revenue, showing what portion of every dollar earned is kept after paying for COGS. It directly relates to COGS by illustrating your efficiency. A lower COGS relative to revenue results in a higher, healthier gross margin.
- Inventory turnover: A ratio calculated by dividing COGS by average inventory. It measures how quickly inventory is sold. A high turnover rate may signal strong sales, while a low rate can indicate tied-up cash flow or potential deadstock.
Frequently asked questions
Are shipping supplies included in COGS?
Packaging materials directly used to prepare a specific product for the customer are generally considered direct costs and can be included in the COGS calculation. This may include examples such as custom boxes and bubble wrap. General office supplies used for administrative tasks are typically excluded.
How are employees' hourly wages factored into the COGS for a specific product?
The calculation typically includes "direct labor," which refers to the wages of employees physically manufacturing or assembling the product. This can be calculated by determining the hourly wage of the production worker and multiplying it by the time it takes to make one unit.
Does the electricity used to run a business count as a direct cost?
This depends on how the electricity is used. Electricity directly powering manufacturing equipment is often considered factory overhead and can be included in COGS. Conversely, electricity used to light an office or retail storefront is an indirect operating expense and is typically excluded.




