Percentage Calculator

Find X% of a number, work out what percent one number is of another, or calculate the percent change between two values, instantly, in your browser.

runs locally on your browser. Your data never leaves your device.

Mode

% of

Result

10

20% of 50 is 10

Common Use Cases

Work out a restaurant tip or a sale discount from a percentage
Check what percent of a total budget, test score, or quota a specific number represents
Compare two numbers (like last month's revenue vs. this month's) as a percent increase or decrease
Double-check a percentage figure quoted in an article, invoice, or spreadsheet

About Percentage Calculator

Percentage math shows up constantly in ordinary life: figuring out a restaurant tip, checking how big a discount actually is, comparing this month's numbers to last month's, or working out what share of a total something represents. But the three common questions people actually ask ("what's X% of Y," "what percent is X of Y," and "how much did this change") each use a different formula, and it's easy to reach for the wrong one under pressure or mix up which number goes in the numerator.

This calculator covers all three as separate modes, selected with the toggle at the top. Find X% of Y answers "what is 20% of 50?" by computing (X ÷ 100) × Y, the everyday tip/discount/tax calculation. X is what % of Y answers "25 is what percent of 200?" by computing (X ÷ Y) × 100, useful for figuring out what share a part represents of a whole, like a test score out of total points or a budget line item out of a total spend. Percent change from X to Y answers "how much did this change from 50 to 75?" by computing ((Y − X) ÷ |X|) × 100, dividing by the absolute value of the starting number rather than the raw number, and explicitly labels the result as an increase or decrease rather than just showing a signed number. Dividing by the absolute value, not the signed value, is what keeps the increase/decrease label matching what actually happened when the starting number is negative: going from −50 to −25 is a real move toward zero (an increase), and would confusingly read as a "decrease" if the formula divided by the raw −50 instead.

All three modes update their result live as you type: there's no "Calculate" button to click, and no page reload. Inputs accept negative numbers and decimals, and each mode clearly flags the one input state that would make its formula meaningless (a zero "of" value in the second mode, or a zero starting value in the third), rather than silently showing "Infinity" or "NaN."

Every calculation runs as plain JavaScript directly in your browser, so nothing you type is ever sent to a server, logged, or stored anywhere. Whether you're checking a tip, grading a test, or comparing two numbers from a spreadsheet, the math happens instantly and privately on your own device.

Frequently Asked Questions

What's the formula for "X% of Y"?
Divide X by 100, then multiply by Y: (X ÷ 100) × Y. For example, 20% of 50 is (20 ÷ 100) × 50 = 10. This is the formula behind everyday calculations like tips, discounts, and sales tax.
What's the formula for "X is what percent of Y"?
Divide X by Y, then multiply by 100: (X ÷ Y) × 100. For example, 25 is what percent of 200? (25 ÷ 200) × 100 = 12.5%. Y can't be zero for this to make sense, since you'd be dividing by zero.
How is percent change calculated, and why does the order of X and Y matter?
Percent change from X to Y is ((Y − X) ÷ |X|) × 100, the difference divided by the absolute value of the original (starting) value, not the new one. Swapping which number is "original" and which is "new" gives a different answer: going from 50 to 75 is a +50% increase, but going from 75 to 50 is a −33.3% decrease, even though the raw difference (25) is the same in both directions. Using the absolute value of the starting number (rather than its raw, possibly-negative value) is what keeps the increase/decrease direction intuitive when the starting number itself is negative.
Why does the tool show an error instead of a result for some inputs?
The "X is what percent of Y" and "percent change" modes both divide by one of your inputs (Y in the first case, the starting value in the second). If that number is zero, the division is undefined, so the tool shows an inline message asking for a non-zero value instead of displaying "Infinity" or a nonsensical result.
Can I enter negative numbers or decimals?
Yes. All three modes accept negative numbers and decimal values, and the result updates live as you type. This is useful for percent-change calculations involving values that can go negative, like a profit/loss figure or a temperature reading.
Is my data sent to a server?
No. Every calculation happens with plain JavaScript directly in your browser. Nothing you type is ever uploaded, logged, or stored anywhere.