Press 20 then % and the display shows 0.2. Now press 100, then +, then 10, then % — and the calculator does not show 10.1. It shows 110. Same key, completely different outcome. The percent key is one of the most context-sensitive buttons on a calculator, and the confusion it causes is entirely predictable once you understand the two jobs it holds.
Job one: standalone percent
When % is the only operation — no addition, subtraction, multiplication or division preceding it in the current expression — it means one thing: divide by 100. Type 20% and the calculator returns 0.2. Type 75% and it returns 0.75. This is the version most people learn first, and it is the version that makes mathematical sense in isolation.
In the source code of the calculator above, this case is handled by replacing any number% that appears at the start of an expression (or after an opening bracket) with (number / 100). The result of 20% is therefore literally 20 / 100 = 0.2. There is no ambiguity here.
Job two: percent of a running sum
This is where the behavior surprises people. When % appears at the end of an expression that already contains an operator (+, −, ×, or ÷), the calculator does something different: it calculates the percentage of the sub-expression to the left of that last operator, then uses that as the second value.
Walk through a concrete example. Enter 100 + 10% and press equals:
- The calculator sees that
%ends an expression with an operator before it. - It evaluates the part to the left of the last
+, which is100. - It calculates
10%of that value:100 × 10 / 100 = 10. - It substitutes that result, giving
100 + 10 = 110.
This is the percentage of the base behavior, and it is exactly what you want for everyday tasks like adding sales tax or applying a discount. To add 8% tax to a $45 item, type 45 + 8% and press equals: the answer is 48.6, not 45.08. Without this behavior you would have to work out 8% of 45 separately and then add it.

Why the behavior changes with operator context
The design is intentional, not a quirk. As Raymond Chen explained in a widely cited post on the Windows Calculator, the percent key was designed for everyday shoppers, not engineers. The goal was to answer the question "what is X plus Y percent of X?" in a single button press, without the user needing to understand percentage algebra. The mathematical form is less obvious; the practical form is immediately useful.
The same logic applies to subtraction. Type 200 − 15% and the calculator returns 170 — it computed 15% of 200 = 30, then subtracted it: 200 − 30 = 170. That is a 15% discount on a $200 price. Most people reaching for the percent key in that context are calculating a discount, not asking for 0.15.
What happens with chained operators
The behavior extends to longer expressions. Consider 10 + 10 + 10%. The calculator evaluates the portion before the final operator: 10 + 10 = 20. Then it calculates 10% of 20, which is 2. The final result is 20 + 2 = 22.
This is confirmed directly in the source code of the tool above: the percent handler uses a greedy regex to find everything up to the last operator, evaluates that sub-expression recursively, then multiplies it by the percent value divided by 100. The percentage is always computed relative to the running total at the point of that last operator.
When to use the % key and when to type the decimal
The percent key is a shortcut with a specific meaning. It works well for these tasks:
- Adding tax or a fee —
price + rate%automatically computes tax on the price. - Applying a discount —
price − rate%deducts the correct amount. - Finding a fraction of a value quickly —
500 × 20%gives100(20% of 500).
It is less suitable for these tasks:
- Converting a percentage to a decimal in isolation —
20%gives0.2, which is correct, but if you then continue with an operator the context shifts. - Complex expressions where the "base" is not the sub-expression to the left — if the number you want to take a percentage of is not immediately before the last operator, the shortcut will compute the wrong base. In that case, calculate the percentage separately and add the result manually.
Try it: enter100 + 10%in the calculator above and press equals. The result is 110 — not 100.1. Then enter10%on its own: the result is 0.1. The same key, two different results, determined entirely by what came before it.