# Discount Calculator

> Computes the final price and amount saved after a percentage discount, an optional second discount applied to the reduced price, and optional sales tax on the result.

- Calculator id: `discount` · Category: Finance (`finance`) · Tool name: `calculate_discount`
- Canonical page: https://tttkmbb.com/finance/discount · This document: https://tttkmbb.com/finance/discount.md · JSON definition: https://tttkmbb.com/finance/discount.json

## Purpose

Computes the final price and amount saved after a percentage discount, an optional second discount applied to the reduced price, and optional sales tax on the result.

**Use when:** You want the sale price after a percent-off promotion, the effective rate of two stacked discounts (e.g. 20 % off plus an extra 10 %), or the checkout price with tax.

**Do not use when:** You know the original and sale prices and need the percentage off (use percentage-change), or the discount is a fixed amount rather than a percent (just subtract it).

## Input

| Parameter | Type | Unit | Required | Description |
| --- | --- | --- | --- | --- |
| `original_price` | number |  | required | List price before any discount. (min 0, max 1000000000) |
| `discount_percent` | number | % | required | First percentage off the original price. (min 0, max 100) |
| `second_discount_percent` | number | % | optional, default 0 | Optional extra percent off applied to the already-discounted price (stacked, not added). (min 0, max 100) |
| `tax_percent` | number | % | optional, default 0 | Optional sales tax or VAT applied to the final discounted price. (min 0, max 100) |

## Output

| Field | Type | Unit | Description |
| --- | --- | --- | --- |
| `final_price` | number |  | Price after all discounts, before tax. |
| `amount_saved` | number |  | original_price − final_price. |
| `effective_discount_percent` | number | % | Combined percentage off the original price. |
| `price_after_first_discount` | number |  | original_price × (1 − discount_percent/100). |
| `final_price_with_tax` | number |  | final_price × (1 + tax_percent/100). |

## Formula

`final_price = original_price × (1 − discount_percent/100) × (1 − second_discount_percent/100); amount_saved = original_price − final_price; effective_discount = amount_saved / original_price × 100; final_price_with_tax = final_price × (1 + tax_percent/100)`

## Data Sources

- Wikipedia – Discounts and allowances — https://en.wikipedia.org/wiki/Discounts_and_allowances (reference, retrieved 2026-09-23)
- Wikipedia – Percentage — https://en.wikipedia.org/wiki/Percentage (reference, retrieved 2026-09-23)

Data freshness: `static`. Deterministic formula with fixed constants; results never go stale. Inputs supplied by the caller determine the output.

## API

- `GET https://tttkmbb.com/api/v1/calculate/discount?original_price=…&discount_percent=…`
- `POST https://tttkmbb.com/api/v1/calculate/discount` with JSON body `{"inputs": {…}}`
- Response: unified envelope (`success`, `request`, `result.values`, `result.units`, `sources`, `freshness`, `timestamp`, `next_actions`, `links`); see https://tttkmbb.com/docs/response-format.md
- Schema: https://tttkmbb.com/api/v1/calculators/discount · OpenAPI operationId `calculate_discount` in https://tttkmbb.com/openapi.json
- Authentication: none. Rate limit: fair use, see https://tttkmbb.com/docs/rate-limits.md.

## MCP

- Server: `https://tttkmbb.com/mcp` (Streamable HTTP, JSON-RPC 2.0, no auth)
- Tool:  `run_calculator` with `{"calculator_id": "discount", "inputs": {…}}`

## Example

- 80 at 25 % off: inputs `{"original_price":80,"discount_percent":25}` → `{"final_price":60,"amount_saved":20,"effective_discount_percent":25,"final_price_with_tax":60}`
- 200 at 20 % off plus extra 10 %, 8 % tax: inputs `{"original_price":200,"discount_percent":20,"second_discount_percent":10,"tax_percent":8}` → `{"final_price":144,"amount_saved":56,"effective_discount_percent":28,"price_after_first_discount":160,"final_price_with_tax":155.52}`

```
GET https://tttkmbb.com/api/v1/calculate/discount?original_price=80&discount_percent=25
```

## Limitations

You know the original and sale prices and need the percentage off (use percentage-change), or the discount is a fixed amount rather than a percent (just subtract it). All values are computed from the formula above; no measurement or live data is involved.

## FAQ

**Is 20 % off plus 10 % off the same as 30 % off?**

No. The second discount applies to the reduced price, so the combined discount is 1 − 0.8 × 0.9 = 28 %, not 30 %.

**Is tax charged on the discounted price?**

In most jurisdictions store discounts reduce the taxable amount, so tax is applied to final_price; manufacturer coupons are sometimes taxed on the pre-coupon price.

## Related

- [Percentage Calculator](https://tttkmbb.com/math/percentage.md) — General percent-of and percent-off arithmetic.
- [Sales Tax Calculator](https://tttkmbb.com/finance/sales-tax.md) — Add or extract sales tax on its own.
