Shelves / Arithmetic and Numbers
AN·07
Decimals and Percentages
Place value continued to the right of the point: what decimals are, why multiplying by 10 moves the point, how to add, multiply and divide them and why the rules work, exactly which fractions give decimals that end (and why 0.1 never ends in binary), repeating decimals and why 0.999… is 1, and percentages, including the traps in percentage change.
Start here
What this chapter answers
What does the 7 in 25.307 mean? Why is 0.5 bigger than 0.45, even though 45 is bigger than 5? Why does multiplying by 10 move the decimal point instead of adding a zero? Why do you count decimal places when multiplying? Which fractions give decimals that end, and why does repeat every six digits? Is 0.999… really equal to 1? And why does a 10 % rise followed by a 10 % fall leave you poorer?
Decimals in one picture
Chapter 2 bundled ten ones into a ten and ten tens into a hundred. Now go the other way: unbundle one into ten equal pieces, tenths, and each tenth into ten hundredths, and so on, forever if you like. The decimal point marks where the ones end and the pieces begin.
So 25.307 is 2 tens, 5 ones, 3 tenths, 0 hundredths and 7 thousandths. The pattern of place value continues unchanged to the right: each position is a tenth of the one to its left. That's all a decimal is, and every rule in this chapter follows from it.
Place value to the right
Tenths, hundredths, thousandths
Chapter 10 writes as , as , and so on, so that the whole numeral is a single pattern of powers of ten. Every decimal that ends is a fraction with a power of ten below: , .
Zeros that matter and zeros that don't
The 0 in 25.307 holds the hundredths place, exactly like the 0 in 307. But a zero at the end of a decimal changes nothing: , because five tenths are fifty hundredths (equivalent fractions: ). Trailing zeros are sometimes written on purpose, to show precision (a length "2.50 m" claims accuracy to the centimetre); chapter 11 is about that.
Comparing decimals
Line up the decimal points and compare from the left, exactly as with whole numbers. 0.5 or 0.45? Write 0.5 as 0.50: fifty hundredths against forty-five. 0.5 is larger. The digit string "45" looks bigger than "5", but the 4 in 0.45 is only four tenths, while the 5 in 0.5 is five tenths. Longer is not bigger: 0.1 is larger than 0.0999.
Multiplying and dividing by 10
Multiplying by 10 makes every piece ten times bigger: tenths become ones, hundredths become tenths. Every digit moves one place to the left, which looks like the point moving one place right:
"Multiplying by 10 adds a zero" is the whole-number shadow of this rule: with no digits after the point, the shift leaves the ones place empty, and a zero fills it. With digits after the point, is 25, not 2.50.
Calculating with decimals
Adding and subtracting: line up the points
: tenths must go with tenths, so line up the points (not the right-hand ends), and fill gaps with zeros if it helps:
3.70
+ 12.45
-------
16.15
It's chapter 3's column addition, with carries crossing the point exactly as they cross any other place: ten hundredths make a tenth, ten tenths make a one.
Multiplying: count the decimal places
. Ignore the points: . There are 1 + 2 = 3 digits after the points in the question, so put 3 in the answer: 0.840, which is 0.84.
Why it works: and , so the product is . Counting decimal places is counting the zeros in the denominators. A quick estimate catches a misplaced point: is about , under 1.
Dividing: make the divisor whole
. Dividing by a decimal is awkward, so multiply both numbers by 100, which doesn't change the quotient ( , equivalent fractions): . It's chapter 3's "same difference" idea for division: scaling both numbers by the same factor keeps their quotient.
Dividing a decimal by a whole number is long division that carries on past the point: : 8 into 7 is 0, remainder 7; bring down a 0 (seventy tenths): 8, remainder 6; then sixty hundredths: 7, remainder 4; forty thousandths: 5, remainder 0. So .
Fractions and decimals
Fraction to decimal: divide
is , so long division turns any fraction into a decimal: , , . Sometimes the division ends; sometimes it never does.
Which decimals end?
So , and end; , and don't, because 3 is among their denominators' primes. (Check that the fraction is in lowest terms first: ends, even though 6 has the factor 3.)
The proof works in any base : a fraction's expansion in base ends exactly when its denominator's primes all divide . In base 12, is , which ends. In binary, only denominators that are powers of 2 end, so , with the prime 5 in its denominator, never ends in binary: it's , repeating forever. That's chapter 1's : a computer must cut the binary expansion off, and stores a number slightly different from 0.1.
Why the others repeat
In the long division for , each step's remainder is one of . If a remainder is ever 0, the division ends. If not, there are only possible remainders, so within steps one must repeat, and from then on every step repeats too, because each step depends only on the remainder. So every fraction's decimal either ends or repeats, and the repeating block (the period) is at most digits long. uses all six possible remainders, and its period is 6; also has period 6, using only six of its twelve. We write the repeating block with a bar over it, or in brackets: , .
Repeating decimal to fraction
Run it backwards. Let . The block has 2 digits, so multiply by 100: . Subtracting, the endless tails cancel:
So every repeating decimal is a fraction, and every fraction is an ending or repeating decimal: the two descriptions name the same numbers. Chapter 12 shows that decimals which neither end nor repeat exist, and they are not fractions.
0.999… = 1
Apply the same method to : , so and . This surprises almost everyone, so here are two more ways to see it. ; multiply both sides by 3. Or: if were less than 1, there'd be a number between them (chapter 6: there always is), and its decimal would have to be bigger than at some digit, which is impossible when every digit is already 9. A number can have two decimal names (1 and 0.999…, 0.5 and 0.4999…); only numbers whose decimals end have this pair, and it doesn't break uniqueness of whole-number numerals (chapter 2), which never involve infinitely many digits.
Percentages
Per hundred
Per cent means "per hundred": . A percentage is a fraction with denominator 100, which makes comparisons immediate: 7 out of 20 (35 %) against 8 out of 25 (32 %). Useful equivalents: , , , , , , .
Three questions, one equation
Almost every percentage problem is , with one of the three unknown:
- Percent of a whole: 18 % of ₹2,450 is . (Or 10 % is 245, 1 % is 24.5, so 18 % is .)
- What percent? 150 out of 1,250 is .
- The whole from a part (reverse percentage): after a 20 % discount a phone costs ₹2,000. The ₹2,000 is 80 % of the original, so the original was , not .
Percentage change
A rise from ₹1,250 to ₹1,400 is a change of 150 on a starting value of 1,250: . The percentage is always of the starting value. That's why changes don't undo each other: a 10 % rise and then a 10 % fall multiplies by , a net 1 % loss. The fall is 10 % of a bigger number.
Successive changes multiply: a 10 % rise is "× 1.10", a 20 % discount is "× 0.80". Five years of 6 % growth multiply by , a 33.8 % rise, not . That gap, growth on growth, is compounding; chapter 10 and the shelf capstone's loan calculations live on it.
Percent and percentage points
If an interest rate goes from 6 % to 8 %, it has risen by 2 percentage points, but by 33 % (2 is a third of 6). Both statements are true and they mean very different things; news reports and adverts often choose whichever sounds more impressive. When a quantity is itself a percentage, say which you mean.
Lab: decimals in code
Experiment 1: long division finds the repeat
def decimal_expansion(a, b):
"""Long division of a by b (a < b): the digits before the repeat, and the repeating block."""
digits, seen, r = "", {}, a
while r and r not in seen:
seen[r] = len(digits) # remember where each remainder first appeared
r *= 10
digits += str(r // b)
r %= b
if not r:
return digits, "" # remainder 0: the decimal ends
start = seen[r]
return digits[:start], digits[start:]
for a, b in [(3, 8), (1, 3), (1, 6), (5, 12), (1, 7), (1, 13), (1, 17), (1, 97)]:
pre, rep = decimal_expansion(a, b)
shown = "0." + pre + (f"({rep})" if rep else "")
print(f"{a}/{b:<3} = {shown[:42]:<42} period {len(rep)}")
def only_2_and_5(n):
for p in (2, 5):
while n % p == 0:
n //= p
return n == 1
ends = [n for n in range(2, 51) if decimal_expansion(1, n)[1] == ""]
print("1/n ends for n =", ends)
print("exactly the n whose only primes are 2 and 5:", ends == [n for n in range(2, 51) if only_2_and_5(n)])
3/8 = 0.375 period 0
1/3 = 0.(3) period 1
1/6 = 0.1(6) period 1
5/12 = 0.41(6) period 1
1/7 = 0.(142857) period 6
1/13 = 0.(076923) period 6
1/17 = 0.(0588235294117647) period 16
1/97 = 0.(010309278350515463917525773195876288659 period 96
1/n ends for n = [2, 4, 5, 8, 10, 16, 20, 25, 32, 40, 50]
exactly the n whose only primes are 2 and 5: True
The program is the proof: it records every remainder, and the moment one comes back, the digits from there on must repeat. and reach the longest possible period ( digits), cycling through every possible remainder; doesn't. and have a part that doesn't repeat first, because their denominators mix a 2 with a 3. And among to , the ones that end are exactly those whose denominators have only the primes 2 and 5, as the theorem says.
Experiment 2: rounding a number the computer can't store
from decimal import Decimal, ROUND_HALF_UP
print(round(2.675, 2), round(0.125, 2), round(2.5), round(3.5))
print(Decimal(2.675))
print(Decimal("2.675").quantize(Decimal("0.01"), rounding=ROUND_HALF_UP))
print(Decimal("0.1") * 3 == Decimal("0.3"), 0.1 * 3)
2.67 0.12 2 4
2.67499999999999982236431605997495353221893310546875
2.68
True 0.30000000000000004
round(2.675, 2) gives 2.67, not 2.68. The second line shows why: the float written 2.675 is really a binary fraction slightly below 2.675, so it rounds down correctly. round(0.125, 2) gives 0.12 for a different reason: 0.125 is exactly representable (it's ), and Python rounds exact halves to the even neighbour ("banker's rounding"), which is also why round(2.5) is 2 and round(3.5) is 4. Chapter 11 discusses rounding rules. Python's decimal module stores decimal digits, not binary, so Decimal("2.675") really is 2.675 and rounds half up to 2.68 when asked, and is exactly 0.3. That's why money is handled with decimal types or whole paise, never with floats.
Experiment 3: percentages that don't cancel
price = 1000
up_then_down = price * 1.10 * 0.90
print(round(up_then_down, 2), "after +10% then -10%")
print(round(price * 0.90 * 1.10, 2), "after -10% then +10%")
total_with_gst = 1180
print("price before 18% GST:", round(total_with_gst / 1.18, 2), " wrong way (take 18% off):", round(total_with_gst * 0.82, 2))
print("five years of 6% growth:", round(100 * 1.06 ** 5, 2), " not", 100 + 5 * 6)
990.0 after +10% then -10%
990.0 after -10% then +10%
price before 18% GST: 1000.0 wrong way (take 18% off): 967.6
five years of 6% growth: 133.82 not 130
A rise and an equal fall lose 1 % in either order, because multiplication is commutative: . Removing 18 % GST from a bill of ₹1,180 means dividing by 1.18 (the bill is 118 % of the price), which gives ₹1,000; taking 18 % off the bill gives ₹967.60, ₹32.40 too little. And growth compounds: 6 % a year for five years is 33.82 %, not 30 %.
Worked examples
Decimal arithmetic with checks
Repeating decimals both ways
A pay rise, a discount and GST
Exercises
Practice
- Write in expanded form with fractions: (a) 4.06; (b) 30.705.
- Put in order, smallest first: 0.6, 0.06, 0.606, 0.66, 0.0666.
- Calculate: (a) ; (b) ; (c) ; (d) .
- Which of these have decimals that end? , , , , . Write the ending ones as decimals.
- Write as fractions in lowest terms: (a) 0.125; (b) ; (c) ; (d) .
- Find: (a) 15 % of ₹840; (b) 36 as a percentage of 48; (c) the original price if ₹1,275 is after a 15 % discount.
- A population grows from 12,500 to 13,750. Find the percentage increase. If it then falls by the same percentage, what is it?
Answers
- (a) ; (b) .
- 0.06, 0.0666, 0.6, 0.606, 0.66. (0.06 is 0.0600, less than 0.0666; 0.6 is 0.600, less than 0.606.)
- (a) 22.08; (b) 16.53; (c) 0.06; (d) .
- ends; doesn't (24 has a 3); ends (simplify first); ends; doesn't.
- (a) ; (b) ; (c) ; (d) let ; , so .
- (a) ₹126; (b) 75 %; (c) .
- . After a 10 % fall: , below where it started.
Harder
- Explain why has a terminating expansion in base 12 and base 6 but not in base 10 or base 2. Which bases make terminate?
- Prove that the decimal for (in lowest terms, coprime to 10) repeats from the first digit, with no non-repeating part.
- A price rises by and then falls by . Show that the net change is a fall of .
- A shop claims "40 % more for free" on a bottle. Another claims "30 % off" the same bottle. Which is the better deal per millilitre?
- A bank's interest rate rises from 7.5 % to 9 %. Describe the change in percentage points and in percent.
Answers
- A fraction terminates in base when its (lowest-terms) denominator's primes all divide . 3 divides 12 and 6, not 10 or 2. needs 2 and 5 to divide the base: bases 10, 20, 30, … (any multiple of 10).
- Since is coprime to 10, multiplying a remainder by 10 and dividing by is reversible: from a remainder you can recover the one before it (it's the unique with leaving that remainder). So the sequence of remainders can be run backwards, and the first remainder to repeat must be the starting one, . The cycle starts at the first digit.
- The multiplier is , which is a fall of of the starting value, that is . For : 1 %.
- "40 % more" gives 1.4 times the amount for the same price: price per ml is of normal. "30 % off" gives price per ml of normal. 30 % off is slightly better.
- Up 1.5 percentage points, which is a rise of in the rate.
Challenge
- The period of for a prime (other than 2 and 5) always divides : for 7 it's 6, for 13 it's 6, for 17 it's 16, for 97 it's 96. Explain why the period is the smallest for which divides , and check it for . (That the period divides is Fermat's little theorem, which goes beyond this book (chapter 5's exercises describe it).)
Discussion
By exercise 9, repeats from the first digit with some period . If the block is the -digit number , then , and multiplying by and subtracting (the method of this chapter) gives , so . Conversely, if , then with , which is a decimal repeating with a block of digits. So the period is the smallest such . For 13: , , …, , and no smaller power works; the block is 076923, matching the lab.
In real life
Misconceptions and limits
The model to keep
Common misconceptions
| Misconception | What's actually true | Where it's shown |
|---|---|---|
| "Longer decimals are bigger: 0.45 > 0.5." | Compare place by place: 0.50 > 0.45. | Comparing decimals |
| "Multiplying by 10 adds a zero." | It shifts every digit one place left; , not 2.50. | Multiplying and dividing by 10 |
| "0.999… is just less than 1." | It equals 1: gives . | 0.999… = 1 |
| "A 10 % rise then a 10 % fall gets back to the start." | It multiplies by 0.99: a 1 % loss. Percentages are of the starting value. | Percentage change |
| "To remove 18 % GST, take 18 % off the total." | The total is 118 % of the price: divide by 1.18. | Experiment 3: percentages that don't cancel |
| "A rate rising from 6 % to 8 % has risen by 2 %." | It has risen by 2 percentage points, which is 33 %. | Percent and percentage points |
| "Decimals like 0.1 are exact in a computer." | 0.1 repeats forever in binary; a float stores a nearby binary fraction. | Which decimals end? |
| "Repeating decimals aren't fractions." | Every repeating decimal is a fraction, and every fraction ends or repeats. | Repeating decimal to fraction |
Limits and trade-offs
- Decimals can't write every fraction finitely. needs infinitely many digits; any calculation with a cut-off decimal is an approximation, and its error has to be tracked (chapter 11).
- Decimal and binary disagree about which numbers are "round". A decimal type matches how people write money and measurements; binary floats are faster and are what scientific computing uses. Choose deliberately.
- Percentages hide their base. "50 % more" of a small number can be less than "10 % more" of a large one; always ask for the base or the absolute numbers.
- Not every decimal is a fraction. Decimals that neither end nor repeat exist (chapter 12); they're the irrational numbers.
Revision sheet
Key ideas
- Decimal places: tenths, hundredths, thousandths; each a tenth of the place to its left. .
- × 10 shifts every digit one place left (the point appears to move right); ÷ 10 shifts right.
- Trailing zeros after the point don't change the value; zeros between digits hold places.
- Compare by lining up points; longer isn't bigger.
- Add/subtract: line up the points. Multiply: ignore points, then count decimal places. Divide: scale both numbers to make the divisor whole.
- Terminates ⇔ lowest-terms denominator has only primes 2 and 5 (in base : only primes of ). 0.1 never ends in binary.
- Otherwise it repeats, with period at most (remainders repeat).
- Repeating → fraction: multiply by , subtract. ; .
- Percent = per hundred; part = percent × whole; reverse by dividing.
- Percentage change is of the starting value; changes multiply (compounding); percentage points ≠ percent.
Glossary
- Decimal point: the mark separating the ones place from the tenths place (a comma in many countries).
- Decimal place: a position to the right of the point; "to 2 decimal places" means to the hundredths.
- Terminating decimal: a decimal with finitely many non-zero digits after the point.
- Repeating (recurring) decimal: a decimal in which a block of digits repeats forever, such as .
- Period: the length of the repeating block.
- Percent (%): hundredths; means .
- Percentage change: the change as a percentage of the starting value.
- Reverse percentage: finding the original amount from an amount after a percentage change, by dividing by the multiplier.
- Percentage point: the unit for the difference between two percentages.
- Multiplier: the number a percentage change multiplies by, such as 1.18 for an 18 % increase or 0.8 for a 20 % decrease.
- Compounding: applying a percentage change repeatedly, each time to the new amount.
- Banker's rounding: rounding exact halves to the nearest even digit (2.5 → 2, 3.5 → 4).