Cost of goods sold (COGS): what it is and how to calculate it
Learn what COGS includes, how to calculate it step by step and how it differs from operating expenses.

Written by Lena Hanna—Trusted CPA Guidance on Accounting and Tax. Read Lena's full bio
Published Tuesday 6 October 2026
Table of contents
Key takeaways
- Cost of goods sold (COGS) is the direct cost of making or buying the products you sell. You subtract it from revenue to get gross profit.
- The basic formula is beginning inventory plus purchases minus ending inventory. Manufacturers and service businesses adapt it to include direct labour and production costs.
- COGS sits above operating expenses on your income statement. Keeping the two apart shows whether your prices cover the direct cost of each sale.
- Your inventory costing method changes your COGS figure. Philippine Financial Reporting Standards (PFRS) allow first in, first out (FIFO) or weighted average cost.
What is cost of goods sold (COGS)?
COGS is the total direct cost of the products you sold during a period. It only counts what went into those goods, so it moves up and down with your sales.
Think of a bakery. Flour, butter and the baker’s wages go into every pan de sal, so they’re part of COGS. The shop’s rent stays the same whether you sell 100 or 1,000 rolls, so it sits elsewhere.
For most businesses, COGS includes these direct costs:
- Raw materials and parts that become the finished product
- Direct labour for staff who make or assemble the product
- Manufacturing overheads, such as electricity for production equipment
- Purchase price of stock you buy to resell
- Inbound freight to get stock or materials to your premises
If you run an ecommerce business, product packaging and fulfilment costs tied to each order may also belong in COGS.
COGS leaves out the costs that stay roughly the same however much you sell:
- Rent for your shop or office
- Marketing and advertising
- Administrative costs, such as accounting fees and office supplies
- Salaries for staff who don’t make the product, like sales or admin staff
Sorting costs correctly is easier when you manage your expenses and track your inventory in one place.
Why COGS matters for small businesses
COGS tells you what each sale costs before overheads, which is the starting point for healthy profit margins. It shapes five everyday decisions in your business.
Pricing
Your price needs to cover COGS before it can cover rent, wages and profit. When you know the direct cost of each item, you can set prices that leave room for overheads. If a supplier raises prices, updated COGS figures show you how much to adjust.
Profitability
Revenue minus COGS gives you gross profit, the money left to pay your operating costs. If gross profit falls while sales grow, your direct costs are likely rising faster than your prices.
Inventory management
Calculating COGS means counting and valuing your stock regularly. Those counts show which products sell quickly, which sit on shelves and where stock goes missing through spoilage or theft.
Taxes
In the Philippines, COGS (called cost of sales for tax purposes) is deducted from your sales to arrive at gross income. Corporations can then claim the optional standard deduction (OSD) of 40% of gross income instead of itemised expenses, according to PwC Worldwide Tax Summaries.
Under either option, your COGS figure feeds straight into your tax return. Overstating it understates your taxable income, while understating it means you overpay tax. Check which approach suits your business with the Bureau of Internal Revenue (BIR) or your accountant.
Strategic decisions
COGS by product shows which lines earn the most on each sale. It helps you decide what to stock more of and where to focus when you want to increase your profits.
How to calculate COGS
To calculate COGS, add your purchases to your beginning inventory, then subtract your ending inventory: COGS = beginning inventory + purchases − ending inventory. Follow these five steps to work it out for any period.
- Set your accounting period, such as a month, quarter or year. Most small businesses calculate COGS monthly or quarterly, plus once a year for tax.
- Find your beginning inventory, which is the value of stock on hand at the start of the period. It equals the previous period’s ending inventory.
- Add purchases and direct costs for the period, including inbound freight and delivery charges from suppliers.
- Count and value your ending inventory on the last day of the period, using the same costing method each time.
- Subtract ending inventory from the total of beginning inventory and purchases. The result is your COGS.
When you track inventory items in accounting software like Xero, COGS is recorded as you sell and shows in your profit and loss report. The formula changes slightly depending on what you sell, as the sections below explain.
Retail COGS formula
Retailers buy finished goods and resell them, so the basic formula applies directly:
COGS = beginning inventory + purchases (including inbound freight) − ending inventory
Record purchases after supplier discounts and returns, so your COGS reflects what you paid.
Manufacturing COGS formula
Manufacturers turn raw materials into products, so COGS also includes the labour and overheads used in production. Start by working out the cost of goods manufactured:
Cost of goods sold formula used by retailers for inventory accounting.
Cost of goods manufactured = direct materials used + direct labour + manufacturing overheads
Then adjust for finished stock that hasn’t sold yet:
COGS = beginning finished goods inventory + cost of goods manufactured − ending finished goods inventory
Some manufacturers also include storage and inbound freight for raw materials, while others record them as operating expenses. Pick one approach and apply it every period so your figures stay comparable.
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 for service businesses
Service businesses hold little stock, but they still have direct costs for each job. Their version of COGS, often called cost of services or cost of revenue, usually looks like this:
Cost of services = direct labour for billable work + materials used to deliver the service
A cleaning company, for example, would include cleaners’ wages for client jobs plus cleaning supplies. Office staff wages and booking software subscriptions stay in operating expenses.
Common COGS calculation mistakes
Small errors in COGS flow straight through to gross profit and your tax return. Watch for these four mistakes:
- Including operating expenses, such as rent or marketing, in COGS
- Leaving out inbound freight and delivery charges from suppliers
- Skipping physical stock counts and relying on estimates for months at a time
- Switching inventory costing methods without disclosing the change in your financial statements
COGS examples
These examples use Philippine businesses and peso amounts to show each formula in action. Each one follows the steps above for a single month.
Retail example: sari-sari store
Say you run a sari-sari store and want your COGS for March. Your records show:
- ₱45,000 in beginning inventory on 1 March
- ₱120,000 in purchases from suppliers
- ₱5,000 in inbound delivery charges
- ₱40,000 in ending inventory on 31 March
COGS = ₱45,000 + ₱120,000 + ₱5,000 − ₱40,000 = ₱130,000
Your March sales were ₱175,000, so your gross profit is ₱175,000 − ₱130,000 = ₱45,000. Your gross margin is ₱45,000 ÷ ₱175,000 = 25.7%. That means you keep about 26 centavos from every peso of sales before paying rent and other overheads.
Manufacturing example: small bakery
Now say you run a small bakery and sell everything you bake on the same day, so you carry no finished goods stock. Your March figures are:
- ₱30,000 in flour, sugar and other ingredients on hand on 1 March
- ₱80,000 in ingredient purchases during the month
- ₱25,000 in ingredients left on 31 March
- ₱60,000 in wages for your bakers
- ₱15,000 in manufacturing overheads, such as cooking gas for the ovens and production-area electricity
Direct materials used = ₱30,000 + ₱80,000 − ₱25,000 = ₱85,000
COGS = ₱85,000 + ₱60,000 + ₱15,000 = ₱160,000
With March sales of ₱240,000, your gross profit is ₱80,000 and your gross margin is 33.3%.
Service example: aircon cleaning business
Service businesses follow the same logic using direct labour and materials. Say you run an aircon cleaning and repair service with these March costs:
- ₱90,000 in wages for technicians working on client jobs
- ₱25,000 in replacement parts, filters and cleaning chemicals
Cost of services = ₱90,000 + ₱25,000 = ₱115,000. With ₱200,000 in revenue, your gross profit is ₱85,000 and your gross margin is 42.5%.
COGS vs operating expenses
COGS are the direct costs you subtract from revenue to get gross profit. Operating expenses are the running costs you then subtract from gross profit to get operating profit.
The simplest test is whether a cost rises and falls with each sale. These costs usually belong in COGS:
- Stock bought for resale
- Raw materials and product packaging
- Direct labour for production or billable work
- Inbound freight on stock and materials
- Production overheads, such as factory electricity
Operating expenses stay roughly the same however much you sell. These costs usually count as operating expenses:
- Rent for shops and offices
- Marketing and advertising
- Salaries for sales, admin and management staff
- Office utilities, internet and software subscriptions
- Accounting and legal fees
How COGS and operating expenses appear on your income statement
Your income statement, also called a profit and loss statement, lists COGS straight after revenue and operating expenses below gross profit. Here’s how the sari-sari store from the earlier example would look for March:
Revenue ₱175,000 − COGS ₱130,000 = gross profit ₱45,000
Operating expenses = rent ₱10,000 + utilities ₱4,000 + store assistant’s wages ₱12,000 = ₱26,000
Gross profit ₱45,000 − operating expenses ₱26,000 = operating profit ₱19,000
Interest and income tax then come off operating profit to leave your net profit. Low gross profit points to pricing or supplier costs, while low operating profit points to overheads.
Classifying borderline costs
Some costs could sit in either category, depending on how your business works. Here’s how they’re usually treated:
- Outbound shipping to customers is usually an operating expense, while inbound freight is COGS
- Utilities for a production floor belong in COGS, while office utilities are operating expenses
- A production supervisor’s salary is part of manufacturing overheads in COGS
- Packaging that forms part of the product, like a branded jar, is COGS
- Payment processing fees are usually operating expenses, though some online sellers include them in COGS
Whichever way you classify a borderline cost, apply the same rule every period. Consistent treatment keeps your gross margin comparable month to month and makes your records easier for your accountant to review.
COGS and different business models
How you calculate COGS depends on what you sell and how you make it. Here’s how it works across four common business models:
- Manufacturers include raw materials, production labour and factory overheads, and track stock at several stages
- Retailers and sari-sari stores mainly count the purchase price of stock plus inbound freight
- Online sellers add product packaging and fulfilment costs tied to each order
- Service businesses count direct labour and materials, often reported as cost of services
Many businesses mix models, such as a café that bakes its own pastries and resells bottled drinks. In that case, apply the right formula to each product line and add the results together.
COGS accounting methods
When you buy the same item at different prices, your costing method decides which cost goes to COGS and which stays in ending inventory on your balance sheet. It’s a core choice in inventory accounting, and it affects both your gross profit and your stock value.
There are four main methods to choose from:
- First in, first out (FIFO) assumes your oldest stock sells first, so COGS reflects older purchase prices
- Last in, first out (LIFO) assumes your newest stock sells first, so COGS reflects recent prices
- Weighted average cost divides the total cost of goods available by total units, giving every unit the same cost
- Specific identification tracks the actual cost of each item, which suits high-value, unique goods like cars or custom jewellery
Under International Accounting Standard 2, known as IAS 2 Inventories, businesses using International Financial Reporting Standards (IFRS) can use FIFO or weighted average cost. That includes businesses reporting under PFRS in the Philippines. LIFO isn’t permitted, and specific identification is for items that aren’t normally interchangeable.
When prices rise, FIFO gives a lower COGS and higher gross profit than weighted average cost, because older, cheaper stock is expensed first. Once you choose a method, use it consistently so your figures stay comparable.
Tips for managing and reducing COGS
Lowering COGS lifts your gross margin without raising prices. These tips help you cut direct costs while keeping quality steady:
- Negotiate better terms with suppliers, such as bulk or early payment discounts
- Compare suppliers regularly and ask for quotes before reordering
- Reduce waste and spoilage by tracking expiry dates and matching production to demand
- Simplify production steps so staff spend less time on each unit
- Combine orders into fewer, larger deliveries to cut inbound freight costs
- Use an inventory management system to avoid overstocking and spot slow-moving items early
Review COGS by product each month. Small savings on your best-selling items add up faster than big cuts on products that rarely sell.
Track your COGS with Xero
Knowing your COGS helps you price with confidence and plan for tax. Xero tracks your inventory, records COGS as you sell and shows gross profit in real-time reports, so you always know where you stand.
Test your pricing with the free margin calculator, or find a Xero advisor to help set up your inventory. Try Xero today and get one month free.
FAQs on COGS
Here are quick answers to common questions about COGS.
Is COGS an operating expense?
No, COGS is a separate expense category that sits above operating expenses on your income statement. Both reduce your taxable profit, but keeping them apart lets you see gross profit before overheads.
Where does COGS appear on the income statement?
It appears directly under revenue, sometimes labelled cost of sales or direct costs. Stock you haven’t sold yet stays off the income statement and sits on the balance sheet as a current asset.
Is COGS a debit or a credit?
COGS is an expense account, so it increases with a debit. When you sell stock under double-entry bookkeeping, you debit COGS and credit inventory for the cost of the goods sold.
Can COGS be higher than revenue?
Yes, if you sell below cost, such as during a clearance sale or after a supplier price rise, which gives you a negative gross profit. COGS itself shouldn’t be negative, so a negative figure usually points to a stock count or data entry error.
Is COGS tax deductible in the Philippines?
Yes, cost of sales reduces your gross income before other deductions are applied. Keep supplier invoices and official receipts for your purchases so you can support the figure if the BIR reviews your return.
What is the difference between COGS and cost of sales?
The terms are often used interchangeably, but cost of sales is broader and also covers the direct cost of delivering services. You’ll often see it on reports for service businesses and under IFRS.
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.