Cost of goods sold (COGS): definition, how to calculate
Learn the cost of goods sold definition, how to calculate it, and use it to price smarter and grow profit.

Written by Lena Hanna—Trusted CPA Guidance on Accounting and Tax. Read Lena's full bio
Published Monday 23 February 2026
Table of contents
Key takeaways
- Calculate your COGS using the appropriate formula for your business type: retailers should use beginning inventory plus purchases minus ending inventory, while manufacturers should add up raw materials, direct labour, manufacturing overheads, and relevant shipping costs.
- Include only direct production costs in COGS such as raw materials, direct labour, and manufacturing overheads, while excluding indirect expenses like office rent, marketing, administrative salaries, and general overhead to ensure accurate gross profit calculations.
- Track COGS regularly to set profitable pricing floors, identify cost reduction opportunities, and make informed decisions about inventory management, product lines, and business strategy.
- Choose the right inventory valuation method (FIFO, LIFO, average cost, or specific identification) based on your business needs and local accounting standards, as this choice directly affects your reported COGS, gross profit, and tax liability.
What is COGS?
Cost of goods sold (COGS) is the direct cost to produce or purchase the goods you sell. It covers the expenses tied directly to creating your products or acquiring inventory for resale.
COGS appears on your income statement and directly affects your gross profit. The lower your COGS, the more profit you keep from each sale.
You can track COGS using accounting software that helps you manage your expenses and inventory.
What's included in COGS
COGS captures the direct costs tied to producing or purchasing the products you sell. Here's what typically counts:
- Direct materials: Raw materials and components that become part of your finished product
- Direct labour: Wages for employees who physically make or assemble your products
- Manufacturing overheads: Factory rent, equipment depreciation, and utilities used in production
Some businesses also include costs that vary by industry:
- Freight and shipping: Costs to receive raw materials or deliver finished goods
- Storage costs: Warehousing expenses for inventory
- Transaction fees: Payment processing costs directly tied to sales
- Sales commissions: Payments to staff based on units sold
The key test: if a cost wouldn't exist without producing or selling a specific product, it likely belongs in COGS.
What's excluded from COGS
COGS only covers direct production costs, a distinction supported by accounting standards like Accounting Standards Codification (ASC) 330-20, which explicitly excludes long-term assets subject to depreciation. Indirect expenses belong in your operating expenses instead. Here's what doesn't count as COGS:
- Rent for office space: Only factory or warehouse rent used for production qualifies
- Marketing and advertising: Costs to promote products, not make them
- Administrative salaries: Pay for managers, accountants, and office staff
- General overhead: Office supplies, software subscriptions, and utilities for non-production spaces
- Research and development: Costs to design new products before production begins
- Distribution costs: Some businesses exclude shipping to customers (check with your accountant)
Why the distinction matters: Misclassifying expenses inflates or deflates your gross profit, which affects pricing decisions, tax calculations, and how investors view your business health.
Why COGS is important for small businesses
COGS shows you the true cost of each sale, helping you set prices, measure profitability, and make informed business decisions.
Without accurate COGS tracking, you might underprice products or miss opportunities to cut costs. Small business owners who start working from home often see their COGS jump when they move to dedicated premises, catching them off guard.
Monitoring COGS helps you spot what's putting pressure on your margins before it becomes a problem. COGS supports better decisions in six key areas.
Pricing
COGS sets your pricing floor. You need to charge more than your COGS to make a profit on each sale. When material or labour costs rise, tracking COGS helps you decide whether to absorb the increase or adjust your prices.
Profitability
Lower COGS means higher gross profit. If you reduce production costs while keeping prices steady, more money flows to your bottom line. Even small COGS improvements add up over time.
Keep in mind that COGS is just one piece of your total expenses. Your operating income also factors in wages, depreciation, and other costs.
Inventory management
COGS analysis reveals which products are worth stocking. By tracking costs alongside sales, you can spot slow-moving items, adjust reorder points, and free up cash tied to excess inventory, which helps prevent goods from becoming unsalable or unusable and requiring costly write-downs.
Taxes
COGS is tax-deductible, which reduces your taxable income. Accurate tracking helps you claim every eligible deduction and keeps your records audit-ready.
Tax rules for COGS vary by location, so check with your local tax authority or accountant.
Understanding your financial health
COGS is a core metric for measuring business health. It feeds directly into your gross profit margin, one of the first numbers investors, lenders, and partners look at when assessing your business.
Strategic decision-making
COGS data informs bigger business moves. When you understand your true production costs, you can confidently evaluate new product lines, automation investments, or changes to your distribution model.
COGS and different business models
COGS applies to most businesses, but the calculation varies by industry. Whether you manufacture products, resell goods, or provide services, you'll track different cost components.
Here's how COGS typically works for each business type:
- Manufacturers: Include raw materials, direct labour, and production overheads like material handling
- Retailers: Calculate COGS using beginning inventory, purchases, and ending inventory for a period
- Service businesses: Include direct labour costs and any materials consumed while delivering services
How to calculate COGS
COGS calculation depends on your business type. Retailers track inventory values at the start and end of a period, while manufacturers add up costs along the production journey.
Both methods give you the same insight: how much it cost to produce or acquire the goods you sold.
Retail COGS formula
Retailers typically use this formula:
Cost of goods sold formula used by retailers for inventory accounting.
Where:
- Beginning inventory: The value of inventory at the start of the period
- Purchases: The cost of inventory acquired during the period
- Ending inventory: The value of inventory remaining at the end of the period
Notice that this formula doesn't count individual sales. Instead, it tracks inventory value changes, which automatically accounts for damaged, discarded, or stolen goods.
Manufacturing COGS formula
Manufacturers track costs along the entire production journey. This formula captures each expense from raw materials to delivery:
Manufacturers have more complex supply chains. It makes sense for them to add up all the costs on their product’s journey to the customer. Be aware that some choose not to count warehousing or freight.
Where:
- Raw materials: The direct materials used to produce goods
- Manufacturing costs: Labour, equipment, and facility costs for production
- Storage costs: Expenses from inventory storage
- Freight: Shipping costs for incoming materials or outgoing products
Some manufacturers exclude warehousing or freight from COGS. Check with your accountant for the approach that fits your business.
If you use accounting software like Xero, you can find COGS in the profit and loss (P&L) or income parts of your financial statements.
Examples of COGS
These examples show COGS calculations in practice.
Retail example
A clothing boutique starts the quarter with $10,000 of inventory. During the quarter, they purchase $25,000 more stock. At quarter end, they have $8,000 remaining.
$10,000 + $25,000 − $8,000 = $27,000 COGS
This means the boutique spent $27,000 on the inventory they actually sold that quarter.
Manufacturing example
A furniture maker buys $7,000 in timber and hardware. They spend $3,000 on workshop labour and utilities, plus $1,200 on shipping finished pieces.
$7,000 + $3,000 + $1,200 = $11,200 COGS
Service business example
A landscaping company pays $2,000 in crew wages for a project, plus $500 in plants and materials.
$2,000 + $500 = $2,500 COGS
Service businesses often have lower COGS because labour is their main direct cost.
Tips for managing and reducing COGS
Negotiate with suppliers
Talk to your suppliers regularly about pricing. Long-term contracts or bulk orders can unlock volume discounts, and comparing quotes from multiple suppliers keeps your costs competitive.
Streamline production processes
Review your production workflow to spot inefficiencies and reduce waste. Automation can lower labour costs and improve consistency, but weigh the upfront investment against your expected savings.
Optimise inventory levels
Use sales data to forecast demand and avoid overstocking. Review your product mix regularly and consider dropping slow-moving items that tie up cash without generating returns.
Reduce freight costs
Compare shipping methods to find the right balance of cost and speed. Consolidating shipments unlocks bulk rates, and negotiating with carriers or using a third-party logistics provider can cut costs further.
COGS accounting methods
Your inventory valuation method determines which costs count as COGS. Different methods assign costs to sold items in different ways, affecting both your reported profit and tax liability.
When you sell inventory, its value moves from your balance sheet to your income statement as COGS. Here are the four main methods.
FIFO (first in, first out) method
FIFO assumes you sell your oldest inventory first, a practice aligned with international accounting standards since the board first adopted International Accounting Standard (IAS) 2 Inventories. This matches how most businesses actually move stock, especially for perishable goods.
When prices rise, FIFO results in lower COGS and higher reported profits because you're expensing older, cheaper inventory.
LIFO (last in, first out) method
LIFO assumes you sell your newest inventory first. During inflation, this results in higher COGS and lower taxable profits because you're expensing more expensive recent purchases.
LIFO is only permitted in the United States. It's not allowed under International Financial Reporting Standards (IFRS), as IFRS only allows FIFO accounting, while US Generally Accepted Accounting Principles (GAAP) permits both. Therefore, businesses in most other countries must use alternative methods.
Average cost method
The average cost method calculates COGS using the weighted average price of all inventory. Each time you purchase stock, the average updates.
This approach smooths out price fluctuations and works well for businesses with large volumes of similar items where tracking individual costs isn't practical.
Specific identification method
Specific identification tracks the exact cost of each inventory item. This method suits businesses selling unique or high-value goods like vehicles, jewellery, or custom furniture.
While highly accurate, it's impractical for businesses with large quantities of similar items.
Manage your COGS with Xero
Accurate COGS tracking supports pricing, profitability, and tax compliance. But managing it manually takes time you could spend growing your business.
Xero accounting software simplifies COGS management with:
- Real-time reporting: See your costs and margins as they happen
- Expense tracking: Categorise costs correctly from the start
- Inventory management: Track stock levels and values automatically
- Financial insights: Spot trends and make informed decisions
Ready to take control of your costs? Get one month free and see how Xero makes managing your business finances easy.
Need help setting up your COGS tracking? Find a bookkeeper or accountant through Xero Advisors.
FAQs on cost of goods sold
Still have questions about COGS? Here are answers to common questions from small business owners.
What's the difference between COGS and operating expenses?
COGS covers direct production costs, while operating expenses cover indirect costs of running your business.
COGS includes materials and labour to make products. Operating expenses include rent, marketing, and administrative salaries.
What is the difference between cost of goods sold and cost of sales?
These terms have a subtle difference, though they're often used interchangeably. COGS refers specifically to direct production or purchase costs.
Cost of sales (COS) may also include transaction fees, sales commissions, or customer acquisition costs, depending on your industry.
How often should I calculate COGS?
Most businesses calculate COGS monthly, quarterly, or annually at the end of each accounting period. If you have high inventory turnover, more frequent calculations give you a clearer view of profitability. Your accountant can recommend the right frequency for your business.
Can I estimate my COGS?
Yes, estimates work when you're starting out or have limited resources. As your business grows, accurate COGS tracking supports profitability analysis and tax compliance. Accounting software makes precise tracking easier.
My business is service-based. Do I still have COGS?
Yes, service businesses have COGS too. Your COGS includes direct labour costs, software subscriptions, and any materials consumed while delivering services to clients.
Are salaries included in COGS?
Only production wages count as COGS. Wages for employees who directly produce goods or deliver services count as COGS. Salaries for administrative staff, managers, and office workers are operating expenses, not COGS.
What is the difference between COGS and product cost?
Product cost is the total cost to make or buy an item. COGS is the product cost of items you've actually sold during a period. Unsold inventory remains on your balance sheet as an asset until it sells, at which point its product cost becomes part of COGS.
Disclaimer
Xero does not provide accounting, tax, business or legal advice. This guide has been provided for information purposes only. You should consult your own professional advisors for advice directly relating to your business or before taking action in relation to any of the content provided.
Start using Xero for free
Access Xero features for 30 days, then decide which plan best suits your business.