Calculate discounted price, final cost, and total savings
An item priced 120 with 25% off costs 90, a saving of 30. Enter one discount or an ordered list of them and see the final price, each percentage applied and the total saved, rounded to the cent. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Original price
- 120
- Discount percentage
- 25
- Discounts
- 25
- Final price
- 90
- Total saved
- 30
Calculate the price you will actually pay after applying one percentage discount or a sequence of reductions. Enter the original price and choose either a single discount percentage or an ordered stack, such as twenty percent followed by another ten percent. The result shows the normalized original price, every percentage applied, the final price, and the total amount saved. Calculations are deterministic, use currency-style cent rounding after each step, and reject invalid percentages instead of silently changing them.
Choose the original price and the correct discount input
Start with a non-negative original price expressed as a number. Then provide exactly one discount method. For promotions that combine reductions, use discounts with an ordered list of one or more percentages.
Do not send both fields, because that would make the intended order ambiguous, and do not omit both. A zero-percent discount is valid and leaves the price unchanged, while a one-hundred-percent discount reduces the current price to zero. Negative percentages are rejected because they would behave like markups rather than discounts.
Any percentage above one hundred also produces an invalid-input error instead of creating a negative price. The original price must be finite and no greater than the documented supported limit. This strict contract is useful for checkout previews and automated workflows: malformed values stop immediately, while accepted inputs always follow the same calculation path.
Understand how sequential discounts change the result
Sequential discounts are applied to the remaining price, not added together and applied once. If an item costs one hundred units and receives twenty percent off, the remaining price is eighty. Applying a further ten percent discount removes eight more units, producing seventy-two, rather than treating the offer as a simple thirty-percent reduction.
This distinction matters for stacked coupons, trade discounts, seasonal markdowns, and negotiated price tiers. The calculator preserves the order supplied in the discounts array and processes every entry once. After each reduction, the intermediate price is rounded to the nearest cent, matching the way many retail systems carry a payable monetary amount from one promotion to the next.
A one-hundred-percent entry makes the current price zero; any later valid discount leaves it at zero. The list is bounded to one hundred entries to keep accidental oversized requests predictable.
Use the output in shopping, quoting, and automation
In particular, messages for excessive values include the phrase exceeds 100, making the business rule explicit instead of silently clamping the percentage. The capability performs no network requests, uses no random values, and keeps no state between calls. That makes it suitable for repeatable tests and batch calculations.
Currency symbols are intentionally absent because the arithmetic works the same for any currency whose normal display precision is two decimal places.
What you can do with it
Check a sale price
Turn a listed price and one advertised percentage into the final price and exact savings.
Evaluate stacked coupons
Apply multiple coupon percentages in order without incorrectly adding their headline rates.
Automate customer quotes
Produce consistent final prices and savings for pricing tools, checkout previews, or approval records.
FAQ
Are stacked discounts added together?
No. Each percentage is applied to the price remaining after the previous discount.
How are prices rounded?
The original price and every sequential intermediate price are rounded to the nearest cent.
How much is 25% off 120?
The final price is 90 and you save 30. Enter 120 as the original price and 25 as the discount; the result also lists the percentage applied so you can check it.
What happens with a 0% or 100% discount?
A zero discount leaves the price unchanged and a full discount brings it to zero. Negative percentages or anything above 100 are refused, since they would act like a markup or create a negative price.
Does the result show how much I save?
Yes. Alongside the final price you get the total saved, which is the rounded original price minus the final rounded price, plus every percentage that was applied, in order.
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/calc2/discount-price \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"original_price":120,"discount_percentage":25}'const res = await fetch("https://api.kit.forhosting.com/calc2/discount-price", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"original_price": 120,
"discount_percentage": 25
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/calc2/discount-price",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"original_price": 120,
"discount_percentage": 25
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/calc2/discount-price", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"original_price":120,"discount_percentage":25}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"original_price":120,"discount_percentage":25}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/calc2/discount-price", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"original_price": 120,
"discount_percentage": 25
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "calc2.discount_price",
"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.
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
Choose the original price and the correct discount input
For a straightforward sale, use discount_percentage with a value from zero through one hundred. The response echoes the discount list, including a single percentage as a one-element list, so downstream code can handle both input styles consistently.
Understand how sequential discounts change the result
The final response includes final_price and total_saved, where total_saved is the rounded original price minus the final rounded price. Because each step uses the same deterministic rule, repeated requests with identical JSON produce identical results.
Use the output in shopping, quoting, and automation
The returned object is designed to be readable directly and easy to pass into another system. original_price records the starting amount rounded to cents, discounts contains the percentages in their applied order, final_price is the amount remaining after every reduction, and total_saved is the overall difference from the starting amount. A storefront can display final_price beside total_saved, a purchasing team can compare supplier offers with different discount stacks, and a quoting service can store the complete discount sequence for later review. For API automation, validate errors by their invalid_input code and use the message to identify the field that failed. The browser version is free to use, while an API request is priced at $0.002.
Technical questions
What happens if a discount exceeds 100 percent?
The request fails with an invalid_input error; excessive percentages are never clamped.
Can I provide both discount fields?
No. Provide either discount_percentage for one reduction or discounts for an ordered stack.
What does the API request cost?
Each API request costs $0.002; the browser calculator is free to use.