Sales calculator
A sale of 100 at 8.25% carries 8.25 in tax, so the customer pays 108.25. Enter the amount before tax and the rate you already know, and get both figures for a quote, cart or invoice. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Amount
- 100
- Tax rate
- 8.25
- Total
- 108.25
- Rate decimal
- 0.0825
- Tax amount
- 8.25
A sale on a quote, a cart, or a cash-register tape is often still a pre-tax figure: the shelf price, the service line, or the subtotal before levy. Closing that sale still requires two numbers before the customer pays: how much tax to add, and what the total becomes once that tax sits on top of the sale. This sales calculator takes a pre-tax amount and a tax rate written as a percentage, multiplies the amount by the rate over one hundred to produce the tax amount, then adds that tax to the original sale to produce the total. Zero percent is a valid exempt sale and yields zero tax with a total equal to the amount.
How sales tax is formed from a pre-tax amount and a percent rate
Sales tax on a closed sale is a forward percent of a pre-tax amount, not a reverse peel of tax already baked into a ticket. If the line is still exclusive of tax, the tax amount is that amount multiplied by the rate divided by one hundred, and the total the buyer pays is the pre-tax amount plus that tax.
Write the rate the way a cash register, a state form, or a marketplace dashboard writes it: eight point two five means eight and a quarter percent, which is a decimal fraction of zero point zero eight two five. One hundred of sale at eight point two five percent therefore has a tax amount of eight dollars and twenty-five cents and a total of one hundred eight dollars and twenty-five cents.
Zero percent is a real business case—tax-exempt resale, groceries in some jurisdictions, or a promotional line—and it yields a tax amount of zero with a total equal to the pre-tax amount. Money fields are rounded half-up to two decimal places after the raw product is formed, which is the convention invoices and bank statements use. The calculator does not look up combined state, county, and city rates from a postal code, does not split a combined rate into jurisdictions, and does not reverse an inclusive total back to a net.
It only applies the rate you already know to the sale you already know: tax amount equals amount times tax rate over one hundred, and total equals amount plus tax amount.
Who needs the tax and total of a sale
People who type sales when they mean the tax on a sale already have a pre-tax figure and a known percent. They want the levy and the total, not a postal-code lookup of combined rates and not a reverse extract from a tax-inclusive receipt. Storefronts, invoicing tools, and marketplace listings store the net line and need a reproducible add-tax step that produces the tax amount plus the total the buyer will see at checkout.
Bookkeepers reconciling quotes against cash-register tapes use the same identity to confirm that each exclusive line plus its rate matches the printed tax and the printed total. Teachers of consumer math assign add-tax worksheets and need an oracle that marks a negative rate as invalid instead of inventing a rebate. Failed validation does not consume balance.
Pair a reverse-extract tool when you start from a tax-inclusive ticket; keep this surface focused on the forward pass from a pre-tax sale to tax and total.
What you can do with it
Consumer-math homework on a sale
Students add sales tax to practice amounts and compare their hand-written levy and total against a deterministic result before submitting the worksheet.
FAQ
How do I compute sales tax and the total from a pre-tax amount?
Send the pre-tax amount and the rate as a percent. Total equals amount plus tax amount. Example: 100 at 8.25% → tax 8.25, total 108.25.
What happens if the tax rate is negative?
A negative sales tax rate is not allowed; zero percent is valid and yields zero tax and a total equal to the pre-tax amount.
Does this look up my city or ZIP sales tax rate?
No. You supply the rate. This calculator only applies a known percent to a pre-tax sale; it does not resolve jurisdictions or reverse an inclusive total.
Can this take the tax out of a total that already includes it?
No. It only adds a known rate to an amount before tax. Pulling the tax back out of a receipt that already includes it is a different calculation, and this tool does not do it.
Is a 0% tax rate allowed?
Yes. Zero percent is a real case, such as a tax-exempt resale, groceries in some places or a promotional line. The tax is zero and the total equals the amount before tax.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/fin/sales \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"amount":100,"tax_rate":8.25}'const res = await fetch("https://api.kit.forhosting.com/fin/sales", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"amount": 100,
"tax_rate": 8.25
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/fin/sales",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"amount": 100,
"tax_rate": 8.25
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/fin/sales", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"amount":100,"tax_rate":8.25}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"amount":100,"tax_rate":8.25}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/fin/sales", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"amount": 100,
"tax_rate": 8.25
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "fin.sales",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Limits
max_abs | 1000000000000 |
max_tax_rate_percent | 1000 |
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
A negative tax rate is rejected as invalid_input rather than treated as a rebate.
How sales tax is formed from a pre-tax amount and a percent rate
A negative rate is not a legal sales-tax input in this model; treating it as a discount would silently invert the meaning of tax, so the engine rejects it with invalid_input rather than returning a negative levy.
Input contract, response shape, and validation
Example: a one-hundred sale at eight point two five percent yields tax amount eight dollars and twenty-five cents and total one hundred eight dollars and twenty-five cents. A forty-nine dollar ninety-nine cent line at seven percent exercises the half-up path: the raw product is three dollars and four thousand nine hundred ninety-three ten-thousandths, which rounds to three dollars and fifty cents, so the published total is fifty-three dollars and forty-nine cents. POST a JSON body with two required finite numbers. amount is the pre-tax sale in currency units and must be greater than or equal to zero; aliases price, pre_tax, subtotal, net, and sale are accepted so cart payloads and invoice rows do not need a rename step. tax_rate is the sales tax rate as a percentage—use 8.25 for eight and a quarter percent, not 0.0825—and must be a finite number greater than or equal to zero; aliases rate, percent, sales_tax_rate, and tax_percent are accepted. Absolute amount must stay within one trillion and tax_rate must stay within one thousand percent so intermediate products remain finite in IEEE double precision on the Worker and in the browser. Missing fields, empty strings, non-finite values, a negative amount, a negative tax rate, or a value outside those limits fail with invalid_input naming the field and are not billed. On success the body echoes rounded amount and tax_rate, returns rate_decimal as the rate over one hundred, tax_amount as the half-up two-decimal levy, total as the tax-inclusive figure, and a formula string you can print next to the numbers. Prefer JSON numbers over currency-formatted strings; currency marks and thousands separators are not parsed. Successful items are billed at $0.002.
Where a sales tax-and-total API earns its keep
Keep requests small, pin the rounded tax_amount and total in tests, and you get stable sales-tax arithmetic for widgets, quote checkers, and edge workers without standing up a tax-engine subscription or a jurisdiction database of your own.
Integration use cases
Checkout and invoice totals
Storefronts and billing tools send a pre-tax sale and a known percent rate, then display tax_amount and the total the customer pays without reimplementing percentage math in every client.
Regression tests for cart libraries
QA pins known-good add-tax cases plus a deliberate negative-rate rejection so billing code cannot silently invert tax into a discount.
Technical questions
Should I enter 8.25 or 0.0825 for the rate?
Enter 8.25. The tax_rate field is a percentage (8.25 means 8.25%). The response also includes rate_decimal (0.0825) for convenience.
What does the sales calculator cost?
The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.