Sub topic 7
Percentages and Powers with % and ^
This chapter covers the two operators that are easiest to misread in Excel: the percent operator % and the exponent operator ^. It assumes you can already enter a formula that starts with =, use the operators + - * /, and refer to other cells by address such as B2. It also assumes you know the basic order of operations from the earlier chapters. By the end you will be able to:
- Write percentage formulas such as tax, discounts, and percent change.
- Predict what
%and^do when they share a formula with other operators. - Avoid the mistakes that produce a plausible but wrong number.
What the % operator does
The % operator is a postfix operator. It goes after a value and divides that value by 100. Excel does not treat % as a unit label. It is a real operator, and it works on numbers, cell references, and parenthesized expressions.
=10%*200Excel reads 10% as 0.1, so this returns 20.
| Formula | What Excel calculates | Result |
|---|---|---|
| `=10%` | 10 / 100 | 0.1 |
| `=50%*80` | 0.5 * 80 | 40 |
| `=A1%` | A1 / 100 (if A1 holds 8) | 0.08 |
| `=(20+5)%` | 25 / 100 | 0.25 |
| `=8%-5%` | 0.08 - 0.05 | 0.03 |
The last row shows a subtlety. The result is 0.03, which Excel may display as 3%. In everyday language that is a difference of three percentage points, not a 3% change in anything.
A percentage is a number, and formatting is a display
A cell that shows 25% stores the number 0.25. The Percentage number format only changes how the number is displayed. It multiplies by 100 for display and adds a % sign. This has several consequences:
- If you type
10%into a General-format cell, Excel stores 0.1 and switches the cell to a percentage format for you. - If you apply the Percentage format to a cell that already holds
10, the cell shows1000%. The stored number is still 10. - In a cell that is already formatted as a percentage, typing
10normally gives10%. Excel's "Enable automatic percent entry" option controls this behavior, so check it if your results differ. - The formula bar shows what is really stored. If a cell displays
8%but the formula bar shows0.075, the display is rounded and the calculation still uses 0.075.
=B2*F1If F1 holds 8%, this multiplies B2 by 0.08. Whether F1 was typed as 8% or as 0.08 and then formatted does not matter. The stored value is the same.
Percentage formulas you will use constantly
Most real percentage formulas fall into four patterns. Learn them as shapes, then substitute your own cells.
Part of a total
To find a percentage of a number, multiply by the percentage.
=200*15%This returns 30. With a rate in a cell, as in =B2*$F$1, it keeps working when the rate changes.
Add or subtract a percentage
To raise a number by a percentage, multiply by 1 plus the rate. To lower it, multiply by 1 minus the rate.
=B2*(1+$F$1)If F1 holds 8%, this adds 8% tax to the price in B2. The $F$1 reference stays fixed when you copy the formula down a column, as covered in the chapter on copying formulas.
=B2*(1-$F$2)If F2 holds a 15% discount, this returns 85% of the price in B2.
Share of a whole
To find what percentage one value is of another, divide, then format the result as a percentage.
=B2/B$10Here B10 is a total. The $ before the row number stays fixed when you copy down, while the column stays relative. After you enter the formula, apply the Percentage format. Do not multiply by 100 yourself. If you do and also apply the format, the cell shows 2500% instead of 25%.
Percent change
To compare an old value and a new value, subtract, then divide by the old value.
=(C2-B2)/B2If B2 is 80 and C2 is 100, the result is 0.25, which displays as 25%. The parentheses matter, and the earlier chapter on parentheses explains why. Without them, Excel divides first and the result is wrong. An equivalent form is =C2/B2-1.
The most common percentage mistake
Adding a bare percentage to a number does not add that percentage of the number. It adds the small number the percentage stands for.
=100+10%This returns 100.1, not 110. The % converts 10% to 0.1 and nothing links it to the 100. To add 10% of 100, write =100*(1+10%) or =100+100*10%.
=100*(1+10%)This returns 110.
What the ^ operator does
The ^ operator raises the number on its left to the power on its right. The number on the left is the base and the number on the right is the exponent.
=2^10This returns 1024, which is 2 multiplied by itself 10 times.
| Formula | Meaning | Result |
|---|---|---|
| `=3^2` | 3 squared | 9 |
| `=2^3` | 2 cubed... no, 2 to the third power | 8 |
| `=2^-1` | 1 / 2 | 0.5 |
| `=4^0.5` | square root of 4 | 2 |
| `=8^(1/3)` | cube root of 8 | 2 |
| `=B2^2` | the square of the value in B2 | depends on B2 |
Three of these deserve explanation.
- A negative exponent gives a reciprocal.
2^-1is 1 divided by 2. - A fractional exponent gives a root. An exponent of 0.5 is a square root, and an exponent of
1/3is a cube root. Wrap a fraction exponent in parentheses. Without them,=8^1/3calculates8^1first, then divides by 3, which gives 2.667. - A cell reference works as either side.
=B2^C2raises the value inB2to the power inC2.
Compound growth
The most common practical use of ^ is compounding. If a value grows by a rate each period, multiply by (1 + rate) once per period. That is the same as raising (1 + rate) to the number of periods.
Suppose these cells hold the inputs:
| Cell | Holds |
|---|---|
| A2 | 1000 (starting amount) |
| B2 | 5% (growth rate per year) |
| C2 | 3 (number of years) |
=A2*(1+B2)^C2This returns 1157.625, which a currency format shows as 1,157.63. Excel reads the formula in this order: it calculates 1+B2 inside the parentheses, raises that to the power of C2, and then multiplies by A2. Change C2 to 10 and the answer updates without any rewriting.
How % and ^ fit into the order of operations
Excel evaluates operators in a fixed order. This chapter adds the two operators that sit in the middle of it. From first to last, the order is:
- Parentheses
- Negation (a minus sign in front of a value, as in
-2) - Percent
% - Exponent
^ - Multiplication and division
*/ - Addition and subtraction
+-
Operators at the same level run from left to right. Because % ranks above * and +, a percentage is converted before any other arithmetic touches it. That is why =200*10%+5 works the way you would hope: 10% becomes 0.1, then 200 times 0.1 is 20, then 5 is added, giving 25.
Worked evaluations
Trace each of these step by step before reading the answer.
| Formula | Steps | Result |
|---|---|---|
| `=3+2^2*2` | 2^2 = 4, then 4*2 = 8, then 3+8 | 11 |
| `=10/2^2` | 2^2 = 4, then 10/4 | 2.5 |
| `=50%^2` | 50% = 0.5, then 0.5^2 | 0.25 |
| `=2^3%` | 3% = 0.03, then 2^0.03 | about 1.021 |
The last row is unusual but legal. The % binds to the 3 before ^ is applied. If you meant "2 cubed, as a percentage", the formula is =2^3 with a Percentage format, or =(2^3)%.
Two traps in the order of evaluation
Negation happens before the exponent
In ordinary mathematics, -2^2 means -(2^2), which is -4. Excel does the opposite. It negates first.
=-2^2This returns 4, because Excel reads it as (-2)^2. Writing =-(2^2) returns -4.
The same rule affects references. If A1 holds 3, then =-A1^2 returns 9, not -9. When you want the negative of a square, use parentheses to say so.
Exponents chain from left to right
Mathematicians usually read 2^3^2 as 2^(3^2), which is 512. Excel groups from the left.
=2^3^2This returns 64, because Excel calculates (2^3)^2. Whenever you chain exponents, add parentheses to show which grouping you want. =2^(3^2) returns 512.
Errors specific to % and ^
You met #DIV/0!, #NAME? and #VALUE! earlier in the tutorial, and the later chapter on formula errors covers them in full. Powers can produce one more error, #NUM!, which means the math is not defined or the result is too large.
| Formula | Result | Why |
|---|---|---|
| `=0^0` | #NUM! | Zero to the power zero is undefined in Excel. |
| `=(-8)^(1/3)` | #NUM! | Excel does not return a real root from a negative base with a fractional exponent. |
| `=10^309` | #NUM! | The result is larger than the biggest number Excel stores. |
| `=0^-1` | #DIV/0! | This means 1 / 0. |
Percent formulas have errors of their own, and Excel does not flag them. Each of these returns a number, so you have to catch them by reading the result:
- A rate typed as
8instead of8%gives a result 100 times too large. - A formatted ratio multiplied by 100 gives a result like
2500%. - A bare
+10%gives a tiny increase instead of 10% of the base. - A percent change with the wrong denominator. Divide by the old value, not the new one.
Putting it together: a price table
Here is a small table that uses everything in this chapter. The rate cells hold F1 = 8% for tax and F2 = 15% for discount.
| Column | Header | Formula in row 2 |
|---|---|---|
| A | Item | (text) |
| B | Price | (a typed number) |
| C | Sale price | `=B2*(1-$F$2)` |
| D | With tax | `=C2*(1+$F$1)` |
| E | Price after 3 years at 2% yearly increase | `=B2*(1+2%)^3` |
If B2 is 200, then C2 is 170, D2 is 183.6, and E2 is 212.2416. Copy each formula down its column. The $F$1 and $F$2 references stay fixed, and B2 and C2 change to match each row.
To check a formula like this, calculate one row by hand with a calculator. Then compare the result to the cell. The earlier chapters on checking and editing formulas describe how to step through a formula's parts.
Summary of rules
%divides the value before it by 100, and it is applied before^,*,/,+and-.- A percent-formatted cell stores a decimal, so
25%is stored as 0.25. - To add or subtract a percentage of a number, multiply by
(1+rate)or(1-rate). Do not add a bare percentage. ^raises to a power. Negative exponents give reciprocals, and fractional exponents give roots. Put fractional exponents in parentheses.- Excel negates before it applies
^, so=-2^2is 4. - Chained exponents group from the left, so
=2^3^2is 64. - When order matters, add parentheses even where they are not strictly needed.
Exercise
A cell A1 holds 250. You want a formula that returns 250 increased by 12%. A colleague writes =A1+12%. What does it return, and what formula returns the correct answer?
Show answer
=A1+12% returns 250.12, because 12% is converted to 0.12 and added to 250 as a plain number. The correct formula is =A1(1+12%), which returns 280. An equivalent form is =A1+A112%.
Exercise
Without entering them, work out the results of =-3^2 and =-(3^2), and of =2^2^3 and =2^(2^3).
Show answer
=-3^2 returns 9, because Excel negates before applying the exponent. =-(3^2) returns -9. =2^2^3 returns 64, because Excel groups from the left, giving (2^2)^3 = 4^3. =2^(2^3) returns 256, because 2^3 = 8 and then 2^8 = 256.
Exercise
Cell A2 holds 5000, B2 holds 4% and C2 holds 6. Write a formula that returns the value of A2 after growing by B2 each year for C2 years. Then say what the result is for these inputs, to two decimal places.
Show answer
=A2(1+B2)^C2. For these inputs it returns 5000 1.04^6 = 6326.60 (about 6326.5959 before rounding).
Exercise
A product cost 80 last month and costs 100 this month, in cells B2 and C2. Write a formula for the percent change and say what you must do to the cell so it shows 25%.
Show answer
=(C2-B2)/B2 returns 0.25. Apply the Percentage number format to the cell so that it displays 25%. Do not also multiply the formula by 100.