Why Cost of Goods Is a Hot Topic for Small Businesses Right Now
Staple prices have risen in traditional markets across East Java, and a small food stall in Palu temporarily shut part of its menu because raw material costs spiked. At the same time, a lecturer from the Faculty of Economics at Universitas Negeri Surabaya (UNESA) was training small business owners on how to calculate cost of goods properly. Both events point to the same reality: when cost of goods rises, margins get squeezed, and a miscalculation multiplies the loss.
Many owners have already fallen into the same misconception. Revenue of Rp5 million feels like Rp5 million of profit, but that figure is only gross sales. What actually belongs to the shop is sales minus cost of goods. And cost of goods does not stay the same from one period to the next, especially when supplier prices shift or when old stock sits on the same shelf as newly purchased stock.
This is why understanding how to calculate cost of goods is not an advanced accounting skill. It is a basic skill that determines your selling price, your stocking decisions, and your ability to tell whether a product is worth pushing further or is quietly eating into your capital. Below you will find the formula, the two valuation methods, worked examples you can apply directly, and how to monitor it all through a cashier app.
What Is Cost of Goods and How Does It Differ from Revenue
Cost of goods, or HPP in Indonesian accounting, is the total cost incurred to produce the goods that were sold. It covers the purchase price from your supplier, packaging, and any other cost directly attached to the product. So cost of goods is not simply the purchase price. It is every cost up to the point the item is ready to sell.
The difference between revenue, cost of goods, and gross profit is a common source of confusion. Here is the comparison.
| Component | What It Means | Example: A Shop Buys 1 kg of Rice for Rp14,000 and Sells It for Rp18,000 |
|---|---|---|
| Revenue | Total sales value before any costs are deducted | Rp18,000 from 1 kg of rice sold |
| Cost of Goods | Total cost of producing the goods that were sold | Rp14,000 (purchase price plus small attached costs) |
| Gross Profit | Revenue minus cost of goods | Rp4,000 |
| Net Profit | Gross profit minus operating costs, wages, and taxes | Rp4,000 minus rent, electricity, wages, and other costs |
This example shows why a single number is never enough. A shop with Rp10 million in sales can still lose money if cost of goods jumped, while a shop with Rp3 million in sales can profit if its cost of goods stays under control. This point has been discussed in the article on Busy Sales Do Not Always Mean Big Profit.
Here is a practical rule: if your margin per product is only Rp1,000 to Rp2,000, one mistake in cost calculation can wipe out the entire month's profit. You need to master the cost of goods formula, not just half-remember it.
The Two Cost of Goods Valuation Methods You Need to Know
Two methods are commonly used to determine cost of goods. The method you pick affects your profit report, but it cannot be chosen casually. Whichever method you use must stay consistent from the start of the fiscal year.
| Method | How It Works | When It Fits |
|---|---|---|
| FIFO (First In, First Out) | The oldest stock is assumed to sell first. If you bought rice at Rp14,000 per kg earlier and Rp16,000 per kg later, the goods sold are costed at Rp14,000 per kg. | Shops with fast-moving stock and relatively stable item values |
| Moving Average | The average cost is recalculated with every new purchase. Buy 10 kg at Rp14,000 then 10 kg at Rp16,000, and the average cost becomes Rp15,000 per kg. | Small shops and warungs that do not need detailed bookkeeping and can benefit from automatic calculation |
In Qasir, the Cost Price Adjustment on Purchase feature uses the moving average method. When your supplier price changes, you simply update the cost price during purchase confirmation, and your profit figure adjusts automatically without any manual recalculation.
Worked Cost of Goods Examples You Can Use Today
Let us calculate with numbers that are realistic for a small grocery shop.
Case 1, FIFO method. The shop bought rice twice in one month: 50 kg at Rp14,000 per kg, then 30 kg at Rp16,000 per kg because market prices rose. By the end of the month, the shop sold 60 kg of rice.
Under FIFO, the 50 kg sold came from the first purchase at Rp14,000 per kg, and the remaining 10 kg from the second purchase at Rp16,000 per kg.
| Component | Calculation | Amount |
|---|---|---|
| Cost from first purchase | 50 kg x Rp14,000 | Rp700,000 |
| Cost from second purchase | 10 kg x Rp16,000 | Rp160,000 |
| Total cost for 60 kg | Rp700,000 + Rp160,000 | Rp860,000 |
| Cost per kg | Rp860,000 divided by 60 kg | Rp14,333 |
| Sales revenue | 60 kg x Rp18,000 | Rp1,080,000 |
| Gross profit | Rp1,080,000 - Rp860,000 | Rp220,000 |
Case 2, Moving average method. With the same purchases, the average cost is (50 x Rp14,000 + 30 x Rp16,000) divided by 80 kg, which is Rp15,000 per kg. All 60 kg sold are costed at Rp15,000 per kg.
| Component | Calculation | Amount |
|---|---|---|
| Average cost | (50 x Rp14,000 + 30 x Rp16,000) divided by 80 kg | Rp15,000 per kg |
| Total cost for 60 kg | 60 kg x Rp15,000 | Rp900,000 |
| Sales revenue | 60 kg x Rp18,000 | Rp1,080,000 |
| Gross profit | Rp1,080,000 - Rp900,000 | Rp180,000 |
The difference is Rp40,000 for 60 kg. For a shop with much higher volume, a gap like that every month adds up quickly. That is why it matters to know which method you are using, so that profit reports are never compared against a different standard.
Case 3, A food and beverage business. For a food business, cost of goods cannot be calculated from the purchase price of finished ingredients alone. Raw materials change after preparation. A cafe selling milk coffee has to account for milk, sugar, ice, cups, and straws.
| Cost Component per Cup | Estimate |
|---|---|
| Milk 30 ml | Rp4,500 |
| Sugar, ice, and powder | Rp1,500 |
| Cup and straw | Rp1,200 |
| Total cost per cup | Rp7,200 |
| Selling price per cup | Rp18,000 |
| Gross profit per cup | Rp10,800 |
In Qasir, this kind of calculation is simplified by the Raw Materials and Recipe feature, where ingredient usage per product is recorded automatically with every sale. The full walkthrough is in the article on Raw Materials and Recipes Are Now Accessible Straight in the Qasir App.
6 Common Mistakes When Calculating Cost of Goods
1. Using the selling price instead of the cost price. This is the most frequent mistake. Cost of goods is always calculated from the cost side, never from the price on the shelf.
2. Counting all purchased stock instead of what was sold. If you bought 100 kg and have only sold 40 kg, this month's cost of goods is calculated from those 40 kg. The rest is still inventory, not an expense.
3. Forgetting packaging costs. Plastic bags, styrofoam boxes, cups, and receipt paper look trivial per transaction, but across 300 transactions a day they can reach hundreds of thousands of rupiah. For food businesses, packaging often accounts for 10 to 15 percent of total cost of goods.
4. Not accounting for damaged or shrinking goods. Items that are damaged, expired, or lost to theft are real losses and must be included in the calculation.
5. Switching methods mid-year. FIFO in January, moving average in March, then FIFO again in June makes profit reports impossible to compare and often confusing when filing taxes.
6. Delaying your records. When transactions are recorded late, cost price and sales data stop matching. By month end, the numbers can be far off from reality.
How to Monitor Cost of Goods and Profit in Qasir
You do not need a separate spreadsheet to monitor this. Three steps are enough to keep your cost of goods and profit figures accurate every day.
Step 1, Make sure every product has a correct cost price filled in. Open the Manage Products menu and fill in the cost price column to match your latest purchase price. Qasir calculates profit automatically from the difference between selling price and cost price.
Step 2, Update the cost price every time you make a purchase. When recording a purchase in the Dashboard, enable Cost Price Adjustment. The moving average cost updates automatically and your profit figure corrects itself with no manual recalculation.
Step 3, Review Sales Summary regularly. Go to Dashboard, then Reports, then Sales Summary. There you can see Total Profit for daily, weekly, and monthly periods. Open the Sales Trend feature as well to see charts and percentage changes in profit over time.
Need a finer breakdown? The Order Type Report can be exported to an Excel file for deeper analysis, which is useful when you want to see which products have the thinnest margins.


Frequently Asked Questions
What is cost of goods (HPP)?
Cost of goods is the total cost incurred to produce the goods that were sold, including the purchase price from suppliers, packaging, and any other cost directly attached to the product. It is always calculated from the cost side, never from the selling price.
How do I calculate cost of goods?
The basic formula is: cost of goods for the period plus purchases, minus cost of goods for the previous period, plus adjustments. For practical per-transaction calculation, use cost price multiplied by units sold, where the cost price follows whichever method you use, FIFO or moving average.
What is an example of calculating cost of goods for food?
For one cup of milk coffee, add up the milk, sugar, ice, cup, and straw costs. In the example above, total cost per cup is Rp7,200 with a selling price of Rp18,000, so gross profit per cup is Rp10,800. From there you can decide whether the selling price still works or needs to go up.
Is cost of goods the same as cost of production?
Not always. For trading and retail, cost of goods is essentially the cost of the merchandise bought for resale. For manufacturing, Cost of Production is more complex because it includes labour, overhead, and every cost involved in the production process.
How do I calculate cost of goods per unit?
Divide total cost of goods by the number of units sold. If cost of goods this month is Rp15,000,000 and you sold 1,000 pcs, the cost per unit is Rp15,000. This figure helps you spot which products have the smallest margin per piece.
Why is cost of goods important for small businesses?
Because cost of goods determines margin, and margin determines how long a business can survive. Without an accurate figure, you do not know which products genuinely contribute profit and which ones quietly erode capital. You also need this data for income tax calculations and for applying for credit or funding.
Start Calculating Accurately Today
Every cost of goods calculation comes down to one thing: accurate cost price and sales data recorded every day without having to memorise anything. Qasir lets you record transactions, update cost prices during purchases, and monitor profit daily, weekly, and monthly in one place, with no spreadsheet and no formulas to recalculate each month.
Start by checking the cost price of the products that sold most this week. If any are empty or no longer match your latest purchase price, update them today too. A small change today is far cheaper than discovering a discrepancy worth hundreds of thousands of rupiah at the end of the month.