How the Indonesia PPN (VAT) calculator is verified

Inputs

InputFieldType
Amount (IDR)amountnumber
This amount isdirectionstring
What is being soldcategorystring
Service or intangible from abroad — the Indonesian buyer self-assesses the PPNreverseChargeboolean
Annual turnover (IDR)annualTurnovernumber

The formula

Each derived value below is computed by the Valem engine from the expression shown, in this order. Nothing else runs — there is no hidden code path.

Derived valueFieldFormula (JSONata)
Rateratecategory = 'zero' ? $const.zeroRate : $const.vatRate
Tax Base SharetaxBaseSharecategory = 'standard' ? $const.otherValueNumerator / $const.otherValueDenominator : 1
Effective RateeffectiveRatereverseCharge ? 0 : $round(rate * taxBaseShare, 4)
Net (price)netAmountdirection = 'remove' ? $round(amount / (1 + effectiveRate), 2) : $round(amount, 2)
Tax base (DPP)taxBase$round(netAmount * taxBaseShare, 2)
PPN charged by the sellervatAmount$round(netAmount * effectiveRate, 2)
PPN self-assessed by the buyerselfAssessedVatreverseCharge ? $round(netAmount * $round(rate * taxBaseShare, 4), 2) : 0
GrossgrossAmount$round(netAmount + vatAmount, 2)
Must RegistermustRegister$n(annualTurnover) > $const.smallBusinessThreshold

Rates and thresholds

The expressions above read these as $const. They are the figures the annual refresh replaces, so they live as data rather than being written into the formulas — which is what makes a year-on-year change a one-line diff instead of an edit to arithmetic.

ConstantValue
vatRate0.12
zeroRate0
otherValueNumerator11
otherValueDenominator12
smallBusinessThreshold4800000000

Test vectors (7)

Every case is executed against this model on each build, by the Java engine and independently by a JavaScript one. A mismatch of a single cent fails the build, so the page cannot ship advertising a figure the model no longer produces.

Case 1 — V1 Rp1,000,000 of ordinary goods: base Rp916,666.67, PPN Rp110,000

given amount1000000
given directionadd
given categorystandard
given reverseChargeno
given annualTurnover0
expect taxBase916666.67
expect vatAmount110000
expect grossAmount1110000
expect effectiveRate0.11

Case 2 — V2 Rp1,110,000 gross back to net

given amount1110000
given directionremove
given categorystandard
given reverseChargeno
given annualTurnover0
expect netAmount1000000
expect vatAmount110000

Case 3 — V3 a luxury good: 12% on the full price

given amount1000000
given directionadd
given categoryluxury
given reverseChargeno
given annualTurnover0
expect taxBase1000000
expect vatAmount120000
expect grossAmount1120000

Case 4 — V4 an export is zero-rated

given amount1000000
given directionadd
given categoryzero
given reverseChargeno
given annualTurnover0
expect vatAmount0
expect grossAmount1000000

Case 5 — V5 a service from abroad: the seller charges none, the buyer self-assesses Rp110,000

given amount1000000
given directionadd
given categorystandard
given reverseChargeyes
given annualTurnover0
expect vatAmount0
expect grossAmount1000000
expect selfAssessedVat110000

Case 6 — V6 exactly Rp4.8 billion is still a small business (“tidak lebih dari”)

given amount100
given directionadd
given categorystandard
given reverseChargeno
given annualTurnover4800000000
expect mustRegisterfalse

Case 7 — V7 above Rp4.8 billion: must register as a PKP

given amount100
given directionadd
given categorystandard
given reverseChargeno
given annualTurnover4800000001
expect mustRegistertrue

Sources

Check it yourself — and reuse it

The whole model as JSON — inputs, outputs, formulas, vectors and sources in one re-runnable document.

This model is published under CC BY 4.0: use it, adapt it, build on it, with attribution. The licence covers the model — the expression of each rule and the arrangement of the catalog. The rates and thresholds are law, and nobody licenses those; the sources above are where they come from.

← Back to the Indonesia PPN (VAT) calculator

Built with Valem — a live, verifiable calculator you can fork and embed.