How the Norway mva (vat) calculator is verified

Inputs

InputFieldType
Amount (NOK)amountnumber
Directiondirectionstring
What is being suppliedcategorystring
No VAT charged by you: zero-rated export, or the customer accounts for the taxreverseChargeboolean
Charitable or non-profit institution or organisationcharityboolean
Taxable turnover in a twelve-month periodturnover12Monthsnumber

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)
Rate for the categoryratecategory = 'food' ? $const.foodRate : category = 'services12' ? $const.servicesRate : category = 'marine' ? $const.marineRate : $const.standardRate
Rate appliedeffectiveRatereverseCharge ? 0 : rate
NetnetAmountdirection = 'remove' ? $round(amount / (1 + effectiveRate), 2) : $round(amount, 2)
VAT (MVA)vatAmount$round(netAmount * effectiveRate, 2)
GrossgrossAmount$round(netAmount + vatAmount, 2)
Registration limitregistrationThresholdAppliedcharity ? $const.registrationThresholdCharity : $const.registrationThreshold
Must register for VATmustRegisterturnover12Months > registrationThresholdApplied

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
standardRate0.25
foodRate0.15
servicesRate0.12
marineRate0.1111
registrationThreshold50000
registrationThresholdCharity140000

Test vectors (6)

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 — N1 1,000 kr net at 25%

given amount1000
given directionadd
given categorystandard
given reverseChargeno
given charityno
given turnover12Months0
expect vatAmount250
expect grossAmount1250
expect netAmount1000

Case 2 — N2 1,250 kr gross back to net

given amount1250
given directionremove
given categorystandard
given reverseChargeno
given charityno
given turnover12Months0
expect netAmount1000
expect vatAmount250

Case 3 — N3 food at 15%

given amount1000
given directionadd
given categoryfood
given reverseChargeno
given charityno
given turnover12Months0
expect vatAmount150
expect grossAmount1150

Case 4 — N4 a hotel room at 12% — not the 8% the 2014 resolution stated

given amount1000
given directionadd
given categoryservices12
given reverseChargeno
given charityno
given turnover12Months0
expect rate0.12
expect vatAmount120

Case 5 — N5 exactly 50,000 kr does not yet require registration

given amount0
given directionadd
given categorystandard
given reverseChargeno
given charityno
given turnover12Months50000
expect mustRegisterfalse

Case 6 — N6 a charity at 100,000 kr is still under its 140,000 kr limit

given amount0
given directionadd
given categorystandard
given reverseChargeno
given charityyes
given turnover12Months100000
expect registrationThresholdApplied140000
expect mustRegisterfalse

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 Norway mva (vat) calculator

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