Sub topic 7
Percentages and powers with % and ^
This chapter covers the two operators that handle percentages and powers. You should already know how to start a formula with =, use + - * /, and apply Excel's order of operations. Cell references are covered in an earlier chapter, and this chapter uses them lightly.
The percent operator
The % operator divides the number before it by 100. Excel reads 10% as 0.1, so it works in a formula like any other number.
=10%*200This formula returns 20, because 10% becomes 0.1 and 0.1*200 is 20.
You can put % after a typed number or after a cell reference. If A2 holds 50, then =A2% returns 0.5.
Percent formatting and stored values
A cell formatted as Percentage still holds a plain decimal. If you type 8% in cell F1, Excel stores 0.08 and displays 8%. A formula that refers to F1 uses 0.08.
This explains a common mistake. If you format a cell as Percentage after typing 8, Excel may show 800% because it treats the stored number 8 as 8.00. Type the % sign with the number, or enter 0.08 and then apply the format.
Adding a percentage to a value
To raise a price by a tax rate, multiply by 1 plus the rate. The parentheses make Excel add before it multiplies.
=B2*(1+$F$1)If B2 holds 50 and F1 holds 8%, this returns 54. The $F$1 reference stays fixed when you copy the formula down a column. Absolute references get their own chapter.
A formula like =B2+B2*F1 gives the same result, because multiplication happens before addition. The (1+rate) form is shorter and easier to read.
The exponent operator
The ^ operator raises the number before it to the power of the number after it. =3^2 returns 9, and =2^10 returns 1024.
A fractional exponent gives a root. =9^(1/2) returns 3, the square root of 9. The parentheses matter here. Without them, =9^1/2 calculates 9^1 first and returns 4.5.
Where % and ^ fit in the order
Excel calculates in this order, from first to last:
| Step | Operation | Example |
|---|---|---|
| 1 | Negation | `-2` |
| 2 | Percent | `10%` |
| 3 | Exponent | `3^2` |
| 4 | Multiplication and division | `4*5`, `8/2` |
| 5 | Addition and subtraction | `1+2`, `5-3` |
Operators on the same step run from left to right. Parentheses override all of these steps.
The negation surprise
Negation comes before the exponent. Many people expect the opposite, because in written maths -2² means -(2²).
=-2^2This formula returns 4, not -4. Excel makes the 2 negative first and then squares -2. To get -4, write =-(2^2).
Percent binds tightly
Because % has a high rank, it applies only to the value right before it. In =50+10%, Excel turns 10% into 0.1 first and then adds, so the result is 50.1, not 55. To add 10 percent of 50, write =50+50*10% or =50*(1+10%).
Worked example
Suppose you invest 1,000 at an annual rate of 5%. Put the amount in A2, the rate in B2, and the number of years in C2. Compound growth multiplies by (1+rate) once per year, so the value after C2 years is:
=A2*(1+B2)^C2With A2 = 1000, B2 = 5%, and C2 = 3, Excel works in this order:
1+B2is1.05, because the parentheses run first.1.05^3is1.157625, because the exponent runs before multiplication.1000*1.157625is1157.625.
Without the parentheses, =A2*1+B2^C2 would calculate 1000*1 and 0.05^3 separately and return a meaningless 1000.000125.
Common errors with these operators
- Typing 5 instead of 5%. The formula
=A2*5multiplies by 5, not by 0.05. Type the percent sign or store the rate as 0.05. - Missing parentheses around a fractional exponent.
=8^1/3returns 2.667, not 2. Write=8^(1/3). - Expecting
-x^2to be negative. Excel returns a positive number for=-A1^2. Use=-(A1^2). - Mixing a percent and a whole number in one cell range. If some rates are stored as 5 and others as 5%, the formulas give results that differ by a factor of 100.
Exercise
Cell A1 holds 4 and cell B1 holds 25%. What does each of these formulas return? (a) =A1^2B1 (b) =-A1^2 (c) =A1+B1100
Show answer
(a) 4. Excel calculates 4^2 = 16 first, then 160.25 = 4. (b) 16. Excel negates A1 to -4 first, then squares it. (c) 29. Excel calculates 0.25100 = 25 first, then adds 4.
Exercise
A price is in B2 and a 15% discount rate is in F1. Write a formula that returns the discounted price, and explain why it needs parentheses.
Show answer
=B2(1-F1). The parentheses make Excel subtract the rate from 1 first, giving 0.85. Without them, B21-F1 multiplies first and then subtracts 0.15 from the full price, which is wrong.