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())FORMULAS · MANUAL PERCENTAGES
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.
100.00 + 8.00 = 108.00 GBP
=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())=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())=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())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.