
Price with or without tax
Calculate price with or without tax using the values and assumptions you provide.
Your inputs stay in your browser. Displayed results are rounded to a maximum of 12 significant digits.
Method and assumptions
Method version 1.0.0 · Updated
Calculate
Formula: Tax-included = before-tax × (1 + rate); before-tax = included / (1 + rate)
Calculate price with or without tax using the values and assumptions you provide.
- price
- Price
- taxRate
- Tax rate (%)
- mode
- Mode
Results depend on the assumptions entered; verify professional or safety-critical decisions independently.
Calculate with code
These short examples use the same inputs and core calculation as this tool. Adapt validation and formatting to your application.
JavaScript
const net = 100, taxRate = 0.20;
console.log({ gross: net * (1 + taxRate), tax: net * taxRate }); // gross 120, tax 20TypeScript
const net = 100, taxRate = 0.20;
const gross: number = net * (1 + taxRate);
console.log({ gross, tax: net * taxRate }); // 120, 20Python
net, rate = 100, 0.20
print(net * (1 + rate), net * rate) # gross 120, tax 20Java
double net=100, rate=.20;
System.out.println(net*(1+rate) + ", tax=" + net*rate); // 120, 20C#
decimal net=100, rate=.20m;
Console.WriteLine($"gross {net*(1+rate)}, tax {net*rate}"); // 120, 20