Sub topic 9
Percent, discount, and interest problems
This chapter assumes you can convert a percent to a decimal or fraction, solve a linear equation in one variable, and define a variable with units. Percent problems use the same steps as other word problems. The new part is deciding which quantity the percent applies to.
Percent as a multiplier
"Percent" means "per hundred," so 20% is 20/100, or 0.20, or 1/5. A percent of a quantity is a product:
- 20% of x is 0.20x.
- x increased by 20% is x + 0.20x = 1.20x.
- x decreased by 20% is x − 0.20x = 0.80x.
The last two are the most useful. Increasing or decreasing a quantity by a percent is the same as multiplying it by a single number, called the multiplier. A 20% discount does not subtract 20 dollars. It keeps 80% of the price.
| Phrase | Expression | Multiplier |
|---|---|---|
| 15% of x | 0.15x | 0.15 |
| x increased by 15% | x + 0.15x | 1.15 |
| x decreased by 15% | x − 0.15x | 0.85 |
| 8% sales tax on a price p | p + 0.08p | 1.08 |
| 30% off a price p | p − 0.30p | 0.70 |
Find the base first
Every percent has a base, the quantity the percent is taken of. Most errors in this chapter come from picking the wrong base. In "a jacket costs $48 after a 20% discount," the 20% is a percent of the original price, not of $48. The original price is unknown, so call it p.
- The unknown is the original price. Let p be the original price in dollars.
- The relationship is: original price minus 20% of the original price equals the sale price.
- As an equation: p − 0.20p = 48, which is 0.80p = 48.
from fractions import Fraction
# A jacket costs $48 after a 20% discount. Let p = original price.
# 0.8p = 48 -> p = 48 / 0.8
p = Fraction(48) / Fraction(4, 5)
print(p) # 60
print(p * Fraction(4, 5) == 48) # TrueThe code uses Fraction(4, 5) instead of 0.8 so the comparison is exact. Decimal floats such as 0.8 cannot be stored exactly, and an == check on float results can fail even when your algebra is right.
The check goes back to the words: a $60 jacket with 20% off loses $12 and costs $48. That matches the problem.
Discount, markup, and tax
All three work the same way: the result equals the multiplier times the base.
- Discount of r: result = (1 − r) × original
- Markup or tax of r: result = (1 + r) × original
Suppose a total of $54 includes 8% sales tax. Let p be the price before tax, in dollars. The total is the price plus 8% of the price, so 1.08p = 54 and p = 50. The tax is $4, and $50 + $4 = $54.
A common slip is to compute 8% of $54 and subtract it. That takes 8% of the wrong base, since $54 already includes the tax. The result is $49.68, not $50.
Percent change
Percent change compares a new value with an old one:
percent change = (new − old) / old × 100%
The denominator is always the old value. A price that rises from $40 to $50 changed by 10/40 = 25%. If it then falls from $50 back to $40, the change is −10/50 = −20%. Going up 25% and going down 20% cancel because the two percents use different bases.
Successive percents do not add
Two percent changes in a row multiply their multipliers. A 20% discount followed by an extra 10% off the sale price gives:
0.80 × 0.90 = 0.72
The final price is 72% of the original, so the total discount is 28%, not 30%. The second discount applies to a smaller base. Likewise, a 20% increase followed by a 20% decrease gives 1.20 × 0.80 = 0.96, a net decrease of 4%.
When a problem describes more than one change, write one multiplier per step and multiply them in order. Do not add the percents.
Simple interest
Interest is money paid for the use of money. The amount you start with is the principal. For simple interest, the interest is calculated only on the principal:
I = P × r × t
- I is the interest earned, in dollars.
- P is the principal, in dollars.
- r is the annual rate as a decimal (5% is 0.05).
- t is the time in years.
The rate and time must use the same time unit. A rate of 5% per year with a time of 18 months needs t = 1.5, not t = 18.
For example, $2,000 at 5% simple interest for 3 years earns 2000 × 0.05 × 3 = $300. If the problem gives the interest and asks for the rate, the unknown is r. A deposit of $1,500 that earns $90 in 2 years gives 1500 × r × 2 = 90, so 3000r = 90 and r = 0.03, or 3%.
Compound interest
With compound interest, each period's interest is added to the balance, and the next period's interest is calculated on the larger balance. After n periods at rate r per period:
A = P(1 + r)^n
Here A is the final amount, including the principal. The multiplier 1 + r from the earlier section is applied n times. For $2,000 at 5% compounded annually for 3 years, the amount is 2000 × 1.05³ = $2,315.25. That is $15.25 more interest than the simple-interest total of $2,300.
from fractions import Fraction
P = Fraction(2000)
r = Fraction(5, 100)
n = 3
simple = P + P * r * n
compound = P * (1 + r) ** n
print(simple) # 2300
print(compound) # 9261/4
print(float(compound)) # 2315.25Fraction keeps the result exact, so the compound amount prints as 9261/4 and float converts it to the decimal 2315.25. The amount is a whole number of cents only because this example is small. Real accounts round to the cent at each compounding step.
Money split between two rates
A classic one-variable problem divides a total into two parts that earn different rates. You need only one variable, because the second part is the total minus the first.
An investor puts $10,000 into two accounts, one paying 4% and one paying 6% simple interest per year. The total interest for one year is $520. How much is in each account?
- Let x be the amount in the 4% account, in dollars. Then 10,000 − x is the amount in the 6% account.
- The interest from the two accounts adds up to $520.
- Equation: 0.04x + 0.06(10,000 − x) = 520.
- Distribute: 0.04x + 600 − 0.06x = 520. Combine: −0.02x + 600 = 520, so −0.02x = −80 and x = 4,000.
from fractions import Fraction
# 0.04x + 0.06(10000 - x) = 520 -> 0.04x + 600 - 0.06x = 520
x = (Fraction(520) - 600) / (Fraction(4, 100) - Fraction(6, 100))
print(x, 10000 - x) # 4000 6000
interest = Fraction(4, 100) * x + Fraction(6, 100) * (10000 - x)
print(interest == 520) # TrueCheck against the words: $4,000 at 4% earns $160, and $6,000 at 6% earns $360. The sum is $520, and the two amounts add up to $10,000. The answer is $4,000 at 4% and $6,000 at 6%.
A reasonableness test helps here. If all $10,000 earned 4%, the interest would be $400. If it all earned 6%, it would be $600. The actual $520 lies between them, which fits a split that leans toward the 6% account.
Common errors
- Wrong base. Taking a percent of the final value when it applies to the original. Write "percent of what?" next to the percent.
- Using 20 instead of 0.20. Convert the rate to a decimal before you put it in an equation.
- Adding successive percents. Multiply the multipliers.
- Mixed time units. Match the rate's period (per year, per month) to the time.
- Answering with x only. If x is the amount in the 4% account, the question may ask for the other account or for the interest. Reread the question before you state the answer.
- Forgetting the principal. In compound-interest formulas, A includes the principal. The interest alone is A − P.
Exercise
A shirt is on sale for $68 after a 15% discount. What was the original price? Write the equation, solve it, and check it.
Show answer
Let p be the original price in dollars. The sale price is 85% of the original, so 0.85p = 68, and p = 80. Check: 15% of $80 is $12, and $80 − $12 = $68. The original price was $80.
Exercise
A deposit of $1,500 earns $90 in simple interest over 2 years. What is the annual rate?
Show answer
Let r be the annual rate as a decimal. I = P r t gives 1500 · r · 2 = 90, so 3000r = 90 and r = 0.03. The rate is 3% per year. Check: 1500 × 0.03 × 2 = 90.
Exercise
A store raises a price by 20%, then later lowers the new price by 20%. Is the final price the same as the original? Give the net percent change.
Show answer
No. The multipliers are 1.20 and 0.80, and 1.20 × 0.80 = 0.96. The final price is 96% of the original, a net decrease of 4%. The 20% decrease is taken from the larger, increased price, so it removes more than the 20% increase added.