Home › Math › Percentage Calculator
Percentage Calculator
Solves the three basic percentage questions (a percentage of a number, what percentage one number is of another, and the whole behind a known part and percentage). Always returns the part, the whole and the percent.
When to use
You need a percentage of a value, the percentage one value represents of another, or the base value that a part and its percentage imply.
Do not use when: You need the percentage change between two values (use percentage-change), a price after a percentage discount (use discount) or a tax amount (use sales-tax).
Formula
percent_of: result = x / 100 × y. is_what_percent: result = x / y × 100. percent_of_what: result = x / (y / 100). In every mode part = percent × whole / 100.
Inputs
| Parameter | Type | Unit | Required | Description |
|---|---|---|---|---|
mode | enum: percent_of | is_what_percent | percent_of_what | default percent_of | Which percentage question to solve; x and y take the meaning shown in the label of the chosen mode. | |
x | number | yes | First number: the percent (percent_of) or the part (is_what_percent, percent_of_what). Percents are plain numbers, 15 means 15%. | |
y | number | yes | Second number: the whole (percent_of, is_what_percent) or the percent (percent_of_what). |
Outputs
| Output | Type | Unit | Description |
|---|---|---|---|
result | number | The unknown quantity: the part (percent_of), the percent in % (is_what_percent) or the whole (percent_of_what). | |
sentence | string | The solved statement, e.g. '15% of 240 is 36.' | |
part | number | The part: percent × whole / 100. | |
whole | number | The base value that corresponds to 100%. | |
percent | number | % | The percentage: part / whole × 100. |
Example
What is 15% of 240?: {"mode":"percent_of","x":15,"y":240} → {"result":36,"part":36,"whole":240,"percent":15,"sentence":"15% of 240 is 36."}
30 is what percent of 120?: {"mode":"is_what_percent","x":30,"y":120} → {"result":25,"part":30,"whole":120,"percent":25,"sentence":"30 is 25% of 120."}
GET https://tttkmbb.com/api/v1/calculate/percentage?mode=percent_of&x=15&y=240
Machine access
- API:
GET https://tttkmbb.com/api/v1/calculate/percentage(query parameters) orPOSTwith a JSON body{"inputs": {...}} - Schema: https://tttkmbb.com/api/v1/calculators/percentage · Markdown: https://tttkmbb.com/math/percentage.md · JSON definition: https://tttkmbb.com/math/percentage.json
- MCP: server
https://tttkmbb.com/mcp, toolcalculate_percentage - OpenAPI operationId:
calculate_percentage - Freshness:
static. Authentication: none. Rate limit: fair use (see rate limits).
Sources
- Wikipedia – Percentage (reference)
- Wolfram MathWorld – Percent (reference)
FAQ
Do I enter 15 or 0.15 for 15%?
Enter 15. Percentages are plain percent numbers everywhere on this site; the calculator divides by 100 internally.
How do I find the whole from a part?
Use mode percent_of_what: '36 is 15% of what?' gives x = 36, y = 15 and returns 240.
What is the difference between percent and percentage points?
Going from 10% to 15% is a rise of 5 percentage points but a 50% relative increase. This calculator handles plain percent arithmetic; use percentage-change for relative changes.
Related calculators
- Percentage Change Calculator — Percentage increase or decrease between two values.
- Discount Calculator — Price after a percentage discount.
- Fraction Simplifier — Express the same part/whole relationship as a reduced fraction.