COGS explained: what it is and how to calculate it
Learn how cost of goods sold, or COGS, affects profit and how to calculate it.

Written by Jotika Teli—Certified Public Accountant with 24 years of experience. Read Jotika's full bio
Published Thursday 16 April 2026
Table of contents
Key takeaways
- Calculate COGS using the right formula for your business type: retailers should use beginning inventory plus purchases minus ending inventory, while manufacturers should add up raw materials, manufacturing costs, storage, and freight.
- Track COGS regularly to set prices above your direct production costs and spot when rising costs require a price adjustment to protect your profit margins.
- Reduce COGS by negotiating volume discounts with suppliers, cutting waste from production processes, and keeping inventory levels lean to avoid tying up cash in slow-moving stock.
- Choose an inventory valuation method such as FIFO or average cost and apply it consistently, as your choice directly affects your reported COGS, profit, and tax obligations.
Key takeaways
• Calculate COGS using the appropriate formula for your business type. Retailers should use beginning inventory plus purchases minus ending inventory, while manufacturers should include raw materials, manufacturing costs, storage, and freight expenses.
• Track COGS regularly to set profitable pricing above your direct production costs and identify when price adjustments are needed to maintain healthy profit margins.
• Reduce COGS by negotiating volume discounts with suppliers, streamlining production processes to eliminate waste, and optimising inventory levels to avoid overstocking slow-moving items.
• Choose the right inventory valuation method (first in, first out (FIFO), last in, first out (LIFO), or average cost) as it directly impacts your reported COGS, profits, and tax obligations, with FIFO typically showing lower COGS during inflationary periods.
Cost of goods sold formula used by retailers for inventory accounting.
What is COGS?
Cost of goods sold (COGS) is the direct cost to produce or purchase the goods you sell. It includes raw materials, manufacturing labour, and other expenses directly tied to creating your products. Knowing your COGS helps you set profitable prices and understand your true margins.
Cost of goods sold formula used by retailers for inventory accounting.
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.
COGS typically includes:
- Direct materials: Raw materials and components used in production
- Direct labour: Wages for workers who make your products
- Manufacturing overheads: Factory costs like equipment and utilities
- Freight and storage: Shipping and warehousing costs directly tied to production
- Transaction fees: Payment processing costs for some business models
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.
COGS excludes indirect business costs such as:
- Rent and utilities: Office space costs unrelated to production
- Marketing and advertising: Promotional expenses
- General administrative costs: Back-office operations
- Non-production salaries: Wages for staff not directly making products
Use accounting software to track your cost of goods sold, manage your expenses, and control your inventory. You might be eligible to claim a 20% bonus deduction on technology expenditure to help digitise your small business.
How to calculate COGS
The basic COGS formula is: Beginning Inventory + Purchases − Ending Inventory = COGS
This formula works for most retailers and product-based businesses. Each component represents:
- Beginning inventory: The value of stock at the start of the period
- Purchases: The cost of new inventory acquired during the period
- Ending inventory: The value of unsold stock at the end of the period
This formula works because it captures all inventory that left your business, whether sold, damaged, or discarded. You don't need to track individual sales; the difference between starting and ending inventory tells you what moved.
The manufacturer COGS formula is: Raw Materials + Manufacturing Costs + Storage + Freight = COGS
Each component represents:
- Raw materials: Direct materials used in production
- Manufacturing costs: Labour, equipment, and factory expenses
- Storage costs: Warehousing expenses for materials and finished goods
- Freight: Shipping costs for incoming materials or outgoing products
Some manufacturers exclude storage or freight. Choose a method and apply it consistently.
If you use Xero accounting software, you can find cost of goods sold in the profit and loss or income sections of your financial statements.
Examples of COGS
Retail example
A retail business starts the quarter with $10,000 of inventory, purchases $25,000 during the quarter, and ends with $8,000 remaining.
COGS = $10,000 + $25,000 − $8,000 = $27,000
This means $27,000 worth of inventory was sold or used during the quarter.
Manufacturing example
A manufacturer spends $7,000 on materials, $3,000 on labour and energy, and $1,200 on shipping.
COGS = $7,000 + $3,000 + $1,200 = $11,200
This represents the total direct cost to produce and deliver the goods.
COGS and different business models
Different business models calculate COGS differently:
- Manufacturers: Include production costs like materials, labour, and factory overheads
- Retailers: Track inventory changes between the start and end of each period
- Service businesses: Count labour and materials used to deliver services
Why COGS is important for small businesses
COGS reveals your true production costs so you can set profitable prices and avoid undercharging. Without accurate COGS tracking, small businesses often miss hidden costs that erode margins. COGS data also informs strategic decisions about new product lines, automation investments, and distribution methods.
Common challenges include:
- Scaling costs: Dedicated facilities cost more than home-based operations
- Overlooked expenses: Warehousing, handling, and freight add up quickly
- Seasonal fluctuations: Material costs change throughout the year
Understanding COGS helps you make better decisions in four key areas.
Pricing
COGS sets your pricing floor. You must price above your COGS to generate profit. If your COGS is $15 per unit, pricing at $20 gives you $5 gross profit to cover other expenses.
Track COGS regularly. When costs rise, you'll know it's time to adjust prices or find efficiencies.
Profitability
Lower COGS means higher profits when selling prices stay the same. A 10% reduction in COGS flows directly to your gross margin.
COGS affects gross profit, while net profit also depends on operating expenses like wages, rent, and depreciation. Understanding your COGS is essential for calculating accurate profit margins and building long-term financial security.
Inventory management
Tracking COGS helps you spot inventory problems. You can identify slow-moving items, optimise stock levels, and adjust your product mix based on which items deliver the best margins.
Taxes
COGS is a tax-deductible expense. Accurate tracking helps you maximise deductions and provides documentation if you're audited. The ATO notes that if your trading stock's value has changed by no more than $5,000, you may not have to conduct a formal stocktake. Incorrect valuations can trigger additional tax assessments.
Check the Australian Taxation Office website for specific guidance on income and deductions for business.
Tips for managing and reducing COGS
Negotiate with suppliers
Build stronger supplier relationships to reduce material costs:
- Schedule regular price reviews: Meet quarterly to discuss rates and identify savings
- Negotiate volume discounts: Commit to bulk purchases for consistent cost reductions
- Research alternative suppliers: Maintain competitive options to strengthen your negotiating position
Streamline production processes
Review your production workflow to identify waste and inefficiencies. Map each step and look for bottlenecks or redundant processes.
Automation can reduce labour costs and improve consistency. Calculate the return on investment before committing to major equipment purchases. Small businesses can receive a 20% bonus deduction on expenditure to improve energy efficiency.
Optimise inventory levels
Use sales data to forecast demand and avoid overstocking. Holding excess inventory ties up cash and increases storage costs.
Review your product mix regularly. Items that haven't sold in 90 days may be worth discontinuing or discounting to free up capital.
Reduce freight costs
Reduce shipping costs without sacrificing delivery speed:
- Compare shipping methods: Balance cost against delivery time for each product type
- Consolidate shipments: Combine orders to access bulk shipping rates
- Negotiate carrier contracts: Secure volume discounts based on your shipping frequency
- Consider third-party logistics: Outsource fulfilment to specialists who can negotiate better rates
COGS accounting methods
Your inventory valuation method directly affects reported profits and tax obligations. Different methods assign different costs to sold items, which changes your COGS figure.
When you sell inventory, its value moves from your balance sheet (as an asset) to your income statement (as COGS expense).
FIFO (first in, first out) method
FIFO assumes you sell your oldest inventory first. During inflation, FIFO shows lower COGS because you're matching old, cheaper costs against current revenue. This results in higher reported profits and higher taxes.
LIFO (last in, first out) method
LIFO assumes you sell your newest inventory first. During inflation, LIFO shows higher COGS because you're matching recent, higher costs against current revenue. This results in lower reported profits and lower taxes.
Note that LIFO is not permitted under Australian accounting standards. Most Australian businesses use FIFO or average cost methods.
Average cost method
Average cost calculates a weighted average of all inventory costs. This method smooths out price fluctuations and provides consistent COGS figures between FIFO and LIFO extremes.
FAQs on COGS
Here are answers to common questions about cost of goods sold.
What's the difference between COGS and operating expenses?
COGS includes only direct costs to produce goods, like materials and manufacturing labour. Operating expenses cover indirect costs like rent, marketing, and administrative salaries that keep your business running but aren't tied to specific products.
Can service businesses calculate COGS?
Yes. Service businesses calculate COGS by tracking direct labour and materials used to deliver services. For example, a cleaning business would include cleaning supplies and cleaner wages as COGS.
How often should I calculate COGS?
Calculate COGS at least quarterly for tax reporting. Many businesses track it monthly to monitor pricing and profitability more closely. Real-time tracking through accounting software provides the most timely insights.
Does COGS include shipping to customers?
It depends on your business model. Manufacturers often include outbound freight as COGS. Retailers typically count shipping as an operating expense. Choose one approach and apply it consistently.
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.