If you run a business, sell products, or are learning basic accounting, knowing how to find cost of goods sold is essential. COGS shows the direct cost of making or buying the items you sold during a specific period, and it helps you measure gross profit accurately.
The calculation is straightforward, but the details matter. You need the right inventory values, the right time period, and only the costs tied directly to production or purchase—not general business expenses.
How To Find Cost Of Goods Sold
To find cost of goods sold, use this formula: Beginning Inventory + Purchases During the Period – Ending Inventory = COGS. This tells you the direct cost of the goods sold in a given period. For manufacturers, the formula may also include raw materials, labor, and overhead tied to production.
What Cost of Goods Sold Means
Cost of goods sold, often abbreviated as COGS, is the total direct cost of inventory items sold during an accounting period. It is used on the income statement to calculate gross profit:
Revenue – COGS = Gross Profit
COGS usually includes costs such as:
- The purchase price of merchandise
- Raw materials used in production
- Direct labor for manufacturing
- Freight-in or shipping costs to bring inventory in, if applicable
It usually does not include rent, office salaries, marketing, or other general operating expenses. Those are typically recorded separately as operating expenses.
Step-by-Step Guide to Calculating COGS
1. Determine your beginning inventory
Beginning inventory is the value of inventory you had at the start of the accounting period. This should match the ending inventory from the prior period.
2. Add purchases made during the period
Add the cost of inventory purchased during the period. If you are a manufacturer, this may include raw materials and production-related costs. If you are a retailer, it usually means the cost of goods bought for resale.
3. Subtract ending inventory
Ending inventory is the value of unsold goods still on hand at the end of the period. Since those items were not sold, they should not be included in COGS.
4. Use the formula
COGS = Beginning Inventory + Purchases – Ending Inventory
Example:
- Beginning inventory: $10,000
- Purchases during the period: $25,000
- Ending inventory: $8,000
COGS = $10,000 + $25,000 – $8,000 = $27,000
In this example, the business’s cost of goods sold for the period is $27,000.
What to Include in COGS
What counts as COGS depends on your business type, but the general rule is simple: include only direct costs tied to the goods sold.
For retailers
- Wholesale purchase cost of inventory
- Freight-in or inbound shipping, if it is part of getting inventory ready for sale
- Packaging that is directly tied to the product
For manufacturers
- Raw materials
- Direct labor
- Factory overhead that is directly connected to production
- Work-in-process inventory adjustments, if applicable
For service businesses
Many service businesses do not have traditional COGS in the same way product businesses do. Some may track direct service delivery costs, but the exact treatment can vary by accounting method and jurisdiction. If you are unsure, review your bookkeeping setup with a qualified accountant.
What Not to Include in COGS
To avoid overstating costs, exclude expenses that are not directly tied to the goods sold. Common exclusions include:
- Office rent
- Administrative salaries
- Advertising and marketing
- Utilities for the office, if not directly tied to production
- Sales commissions, unless your accounting method treats them differently
- Income taxes
- Interest expense
These items are usually recorded as operating expenses or other expenses, not COGS.
Why COGS Matters
COGS is important because it affects several key financial measures:
- Gross profit: Lower COGS usually means higher gross profit, assuming revenue stays the same.
- Pricing: Knowing your direct costs helps you set prices that cover expenses and leave room for profit.
- Inventory control: Tracking COGS can reveal shrinkage, waste, or pricing problems.
- Tax reporting: In many cases, COGS is a deductible business expense, but the exact rules depend on your country and business structure.
Because tax treatment can vary, it is wise to confirm local rules rather than assume the same method applies everywhere.
COGS Example for a Small Retail Business
Suppose a small online store begins the month with $4,000 in inventory. During the month, it buys another $12,000 in stock. At month-end, the store has $3,000 of inventory left.
Using the formula:
- Beginning inventory = $4,000
- Purchases = $12,000
- Ending inventory = $3,000
COGS = $4,000 + $12,000 – $3,000 = $13,000
If the store had $20,000 in sales revenue, then gross profit would be:
$20,000 – $13,000 = $7,000
This does not mean the business made $7,000 in net profit. Other expenses such as rent, software, payroll, shipping, and taxes still need to be subtracted.
Common Methods Used to Value Inventory
The way you value inventory can change the COGS figure. The most common methods include:
FIFO
FIFO means “first in, first out.” The oldest inventory costs are assumed to be sold first. In periods of rising prices, FIFO often results in lower COGS and higher ending inventory values, though outcomes depend on actual purchase patterns and price changes.
LIFO
LIFO means “last in, first out.” The newest inventory costs are assumed to be sold first. This method is not allowed in all countries, and accounting rules vary by jurisdiction.
Weighted average
This method averages the cost of all units available for sale and applies that average to units sold. It can smooth out price fluctuations, but it may not reflect the exact cost of specific items sold.
Your inventory method matters because it affects reported gross profit, inventory value, and sometimes taxes.
Helpful Tips for Calculating COGS Accurately
- Keep inventory records updated. Inaccurate counts can distort COGS.
- Separate direct and indirect costs. This makes bookkeeping cleaner and more accurate.
- Track returns and allowances. Returned goods may need to be removed from sales and inventory records.
- Use the same accounting method consistently. Changing methods can make comparisons harder.
- Reconcile physical counts with records. Shrinkage, damage, and theft can affect ending inventory.
Common Mistakes to Avoid
When people learn how to find cost of goods sold, they often make a few avoidable errors:
- Including operating expenses in COGS
- Forgetting to count ending inventory accurately
- Using sales price instead of cost price
- Double-counting purchases already included in inventory
- Ignoring freight, discounts, or purchase returns when they should be included
Even small mistakes can change gross profit and lead to misleading financial statements.
COGS vs. Operating Expenses
It helps to separate COGS from operating expenses:
- COGS: Direct cost of products sold
- Operating expenses: Costs of running the business, such as rent, marketing, and admin salaries
This distinction matters because gross profit is calculated before operating expenses, while net profit is calculated after them.
When You May Need Professional Help
If your business has manufacturing costs, multiple inventory locations, foreign currency purchases, or complex tax reporting requirements, calculating COGS can become more complicated. Accounting rules may differ depending on your country, industry, and filing method. In those cases, a bookkeeper or accountant can help you apply the right method consistently.
Final Takeaway
To find cost of goods sold, start with beginning inventory, add purchases, and subtract ending inventory. Keep only direct product costs in the calculation, and use the same inventory method consistently. If you want to understand the broader accounting picture, you may also find what cost accounting is and how product costs are accounted for helpful next steps.