FIFO vs Average Cost Basis: Why the Method You Pick Changes Your Tax Bill
6 min read
6 min read
You bought the same stock three times, at three different prices. You just sold half your position. What was your profit?
That question does not have one answer. It has at least two, and Indonesian tax law lets you pick between them for shares that are not listed on the IDX. The method you choose, first in first out (FIFO) or average cost, changes your taxable gain on the exact same trade, sometimes by a lot.
FIFO stands for first in, first out. It treats the shares you bought earliest as the ones you sell first. If your oldest shares were bought cheap and the price has since gone up, FIFO books a bigger gain, because it matches your sale against your cheapest, oldest cost.
Average cost blends every purchase into one number. Add up everything you have spent buying the stock, divide by the total shares you hold, and that single average price is treated as the cost of every share you sell, regardless of which specific purchase it came from.
Same shares, same sale, two different ways of answering "what did I pay for what I just sold."
Here is a worked example. Say you bought a US-listed stock in three separate purchases, then sold part of your position:
| Purchase | Shares | Price per share | Cost |
|---|---|---|---|
| Lot 1 | 100 | $50 | $5,000 |
| Lot 2 | 100 | $70 | $7,000 |
| Lot 3 | 100 | $90 | $9,000 |
| Total | 300 | avg $70 | $21,000 |
You then sell 150 shares at $100 each, for $15,000 in proceeds.
Under FIFO, the sale uses up Lot 1 entirely (100 shares at $50) and 50 shares from Lot 2 (at $70). Cost basis: (100 × $50) + (50 × $70) = $8,500. Taxable gain: $15,000 − $8,500 = $6,500.
Under average cost, every share sold is priced at the blended $70 average. Cost basis: 150 × $70 = $10,500. Taxable gain: $15,000 − $10,500 = $4,500.
Taxable gain = Proceeds − Cost basis (method-dependent)
FIFO shows $2,000 more taxable profit than average cost, on the identical trade, because it assumes your cheapest, oldest shares are the ones that just left your account.
If every stock you own is listed on the Indonesia Stock Exchange, this whole question mostly does not apply to you.
Every IDX share sale carries a 0.1% final income tax on the gross transaction value, withheld automatically by your broker. It applies to the full sale amount, not your profit, so it is charged whether you sold at a gain or a loss. Since the tax is not based on your gain at all, your cost basis, and therefore FIFO versus average cost, never enters the calculation. Realized and unrealized gains still matter for understanding your own returns, just not for this particular tax.
The picture changes for stocks that are not exchange-traded on the IDX, which now includes a lot of Indonesian portfolios given how many local apps offer direct access to US-listed shares.
Capital gains on those holdings are not covered by the flat final tax. They get folded into your ordinary income and taxed at Indonesia's progressive individual rates under Pasal 17, alongside your salary and other earnings, reported through your annual tax return (SPT Tahunan, Form 1770). That means your cost basis, the number that decides how big your reported gain is, genuinely changes what you owe.
Converting the $2,000 gap from the worked example above at roughly Rp 17,925 per US dollar (5 August 2026 mid-market rate) gives a difference of about Rp 35,850,000 in taxable gain between the two methods, on this one trade.
What that turns into in actual tax depends on which bracket the extra income falls into, since Indonesia's Pasal 17 rates are progressive:
| Marginal bracket | Extra tax from choosing FIFO over average cost |
|---|---|
| 15% (income Rp 60 million to Rp 250 million) | Rp 5,377,500 |
| 25% (income Rp 250 million to Rp 500 million) | Rp 8,962,500 |
| 30% (income Rp 500 million to Rp 5 billion) | Rp 10,755,000 |
On a single trade, that is not a rounding error. For an active investor who sells and rebuys foreign positions multiple times a year, the gap compounds every time.
Indonesian tax law does not let you choose FIFO on one sale and average cost on the next to minimize each individual bill. Under the Income Tax Law (UU No. 36/2008, Article 10 paragraph 6), inventory and cost valuation for tax purposes must use either the average method or FIFO. LIFO (last in, first out) is not permitted. In practice, this same costing logic is applied to securities.
If your portfolio mixes IDX shares with foreign stocks bought through a local app, know which of your holdings the flat tax covers and which ones depend on your cost basis.
Open your Holdings view in NetWort to see the average cost basis tracked for each position, and your Gains page for how your realized and unrealized profit is adding up overall. NetWort tracks your average cost per position for portfolio purposes, but it is not a tax lot calculator, so for foreign stock sales, keep your own purchase records by lot and confirm which costing method applies to your filing with a licensed tax adviser before you report it. The Market page is a useful starting point if you are weighing whether to add foreign stock exposure in the first place.