FORMULAS · MANUAL PERCENTAGES

Tax Formula Generator

One manually entered percentage. No official tax rate or category is selected.

Amount: up to 2 decimals. Percentage: up to 6 decimals. Non-negative values only.

Output format

Worked example

2 decimals · Half-up rounding
Before tax100.00 GBP
Tax amount8.00 GBP
Total including tax108.00 GBP

100.00 + 8.00 = 108.00 GBP

Before tax 100; tax 8; total 108 GBP.
Spreadsheet settings

A2 = 100 · B2 = 8

Generated output

Before tax

=IFERROR(IF(AND(ISNUMBER(A2),ISNUMBER(B2),A2>=0,A2<=1000000000,ROUND(A2,2)=A2,B2>=0,B2<=1000,ROUND(B2,6)=B2),ROUND(A2,2),NA()),NA())

Tax amount

=IFERROR(IF(AND(ISNUMBER(A2),ISNUMBER(B2),A2>=0,A2<=1000000000,ROUND(A2,2)=A2,B2>=0,B2<=1000,ROUND(B2,6)=B2),ROUND(A2*(B2/100),2),NA()),NA())

Total including tax

=IFERROR(IF(AND(ISNUMBER(A2),ISNUMBER(B2),A2>=0,A2<=1000000000,ROUND(A2,2)=A2,B2>=0,B2<=1000,ROUND(B2,6)=B2),ROUND(A2+ROUND(A2*(B2/100),2),2),NA()),NA())

Rounding and scope

In add mode, tax is rounded before being added. In extract mode, the net amount is rounded and tax is the remaining difference. These are manual arithmetic rules, not country-specific legal rounding.

Input caps, not legal limits: amounts up to 1,000,000,000 for spreadsheets or 1,000,000,000,000 for decimal code; percentages from 0 to 1,000%.

Spreadsheet cells must contain numeric values. Decimal separators, function names and argument separators depend on workbook settings. Spreadsheet numeric precision can differ from decimal arithmetic; use decimal code for precision-sensitive workflows.

Code inputs are decimal strings with a dot separator; the rate is in percentage points. JavaScript uses decimal.js. Python uses the standard-library Decimal type.

No exemptions, multiple tax components, discounts, filing advice or compliant invoice rules are inferred.

Technical references