UK VAT and Price Normaliser avatar

UK VAT and Price Normaliser

Pricing

from $2.00 / 1,000 vat calculations

Go to Apify Store
UK VAT and Price Normaliser

UK VAT and Price Normaliser

Batch GBP net, VAT and gross arithmetic using an explicitly supplied rate and exact decimal rounding.

Pricing

from $2.00 / 1,000 vat calculations

Rating

0.0

(0)

Developer

LandlordTools

LandlordTools

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

9 days ago

Last modified

Security

Limited permissions

Share

Batch GBP net, VAT and gross arithmetic using an explicitly supplied rate and exact decimal rounding.

Inputs and calculation

Provide a GBP amount as a decimal string, basis (net or gross) and an explicit rate of 0, 5 or 20. Those rates correspond to the zero, reduced and standard rates listed by GOV.UK.1 The Actor does not choose which rate applies to a transaction.

For net input: VAT = amount × rate / 100, rounded to pennies; gross = net + VAT. For gross input: VAT = amount × rate / (100 + rate), rounded to pennies; net = gross − VAT. Exact integer arithmetic rounds ties away from zero. All returned money fields are strings with two decimal places. This is a stated calculation convention, not a claim that every invoice must use this rounding method.

Zero, credit amounts and amounts up to 9,999,999,999.99 in magnitude are accepted. No currency symbols, commas, scientific notation, discounts, quantities or implicit defaults. Each row is one already-totalled line; sum of line-rounded VAT can differ from VAT rounded on an invoice total. Rate 0 is arithmetic only and does not classify exemptions. Historical rates, VAT eligibility, reverse charge, registration checks and tax filing are outside scope. Not legal or tax advice.

Example

{
"items": [
{
"amount": "120.00",
"basis": "gross",
"rate": 20
}
]
}

The dataset and local CLI return these rows:

[
{
"rowIndex": 0,
"amount": "120.00",
"basis": "gross",
"rate": 20,
"net": "100.00",
"vat": "20.00",
"gross": "120.00",
"currency": "GBP",
"rounding": "half-away-from-zero; per row"
}
]

Batch and output behaviour

Supply 1–10,000 items. Unknown fields are rejected. Validation finishes for the whole batch before storage or billing. One invalid row fails the run with its zero-based index; input values are not included in the error. Duplicate rows are preserved and each stored row counts as a result. rowIndex preserves input order.

The Apify dataset holds results. The key-value store record OUTPUT contains requestedCount, storedCount, truncated and results. A configured charge limit may shorten the dataset; OUTPUT includes only those saved rows. Start a fresh run after an interruption: a non-empty dataset is rejected to prevent duplicate billing. Storage and billing are not a single transaction; infrastructure failures can leave partial storage or a charge requiring platform review.

Local use and tests

node cli.js examples/input.json
node tests/run.js

These commands need only Node and use no network or SDK installation. The deployment target is Node 22. main.js uses the Apify SDK for platform storage and billing. The container installs the declared dependency during a future build.

Pricing suggestion

Suggested pay-per-event price: $2 per 1,000 stored results ($0.002 per result-item event). No custom start fee. This is a proposed configuration, not active pricing. The manager must configure the exact event name and price in Apify before any release. The SDK call uses Actor.pushData(results, "result-item"); do not also add a separate charge for those rows. Apify billing documentation (accessed 2026-10-03).

Sources and data licences

Contains public sector information licensed under the Open Government Licence v3.0. GOV.UK makes its content available under OGL except where stated otherwise; see the numbered GOV.UK terms source below. Licence: https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/. No external data is fetched at runtime.

  1. GOV.UK VAT rates — accessed 2026-10-03. Open Government Licence v3.0.
  2. GOV.UK terms and conditions — accessed 2026-10-03. Open Government Licence v3.0.

AI-generated software draft for LandlordTools; manager review required before release.