Tools Thicket Logo Tools Thicket

Percentage calculator

Percentage Calculator — calculate percentages, percent of a number, and percent change

Use the three common percentage formulas below; example values are ready on load.

  • Shows the formula behind each answer, so you can check it
  • Handles divide-by-zero and negatives explicitly instead of printing NaN
  • Accepts messy input — commas, currency symbols, a trailing %
Result 30

What is Y% of X?

Result: 30

X is what percent of Y?

Result: 40%

Percent change from X to Y

Percent change: 40% increase

What this calculator does

What this tool will not do

  • Three question types only: Y% of X, X as a percent of Y, and percent change from X to Y.
  • Percent difference is not one of them. That divides by the average of the two values and is the right choice when neither number is the natural baseline — this tool always divides by the original.
  • Standard double-precision arithmetic. Fine for money and everyday figures; not a bignum calculator.
  • Nothing compounds. Applying 10% twice is not the same as 20%, and this tool will not do the multi-step version for you.

Quickly compute Y% of X, find what percent X is of Y, or calculate percent change from X to Y — enter numbers and get an immediate, explained result.

How to use (3 steps)

  1. Enter the two numbers (and a percent if needed). You may include commas, currency symbols, or a trailing '%' (the tool will strip and parse these).
  2. Choose or let the tool detect the question type: (A) "X's Y% is what?" (B) "X is what percent of Y?" (C) "Percent change from X to Y".
  3. Read the numeric result plus a short explanation and the formula used; for edge cases the tool shows a clear explanatory message.

Principles and formulas

A. "X's Y% is what?" (Y% of X)

Formula: result = X * (Y / 100).

Note: if Y is already given as a decimal (e.g., 0.2), treat it as Y_decimal and compute X * Y_decimal.

Units: result uses the same unit as X (currency, count, etc.).

B. "X is what percent of Y?"

Formula: percent = (X / Y) * 100.

Presentation: shown as a percent (e.g., 40%) or as a decimal (e.g., 0.4) per display preference.

Edge case: when Y == 0 the ratio is undefined; see Error handling below.

C. "Percent change from X to Y" (relative percent change)

Formula: percent_change = ((Y - X) / X) * 100.

Interpretation: positive => increase; negative => decrease.

Edge case: when X == 0 the percent change is undefined or may be reported as "infinite" with an explanatory note.

Input parsing and edge-case handling

Accepts numbers with optional commas, currency symbols, and a trailing '%' for percent inputs (these are stripped before parsing).

Non-numeric or NaN/Infinity inputs return a clear error message: "invalid input".

Negative inputs are allowed and treated arithmetically (e.g., -20% of 100 = -20).

Division-by-zero is handled explicitly: if Y == 0 in (B) or X == 0 in (C), the tool returns a clear explanatory message such as "undefined — division by zero" rather than a silent Infinity.

Extremely large values: if platform numeric limits are exceeded, the tool will return Infinity or an explicit overflow/error message.

FAQ

How do I find X% of a number?

Multiply the number by the percent divided by 100: result = X * (Y / 100).

What does it mean when the percent is negative?

A negative percent indicates a decrease or negative direction; calculations proceed normally (e.g., -20% of 100 = -20).

How do I calculate percentage change?

Use percent_change = ((new − old) / old) * 100. Positive means increase; negative means decrease.

What if the original value is zero?

Percentage-change formulas divide by the original value. If the original (denominator) is zero, the percent change is undefined — the tool returns a clear explanatory message (or "infinite" when appropriate) rather than a silent error.

How do I interpret a percent greater than 100%?

A percent over 100% means the compared value is more than the reference (for example, 200% means twice as large).

Can I calculate percentages between negative numbers?

Yes. Use the same formulas; signs are preserved and indicate direction. For comparisons where no natural reference exists, consider percent difference (divide by the average) instead.

Does order matter for percent difference vs percent change?

Yes. Percent change divides by the original (old) value and is directional. Percent difference divides by the average of the two values and is used when there is no natural reference.