TExcelTAD
Home › Basic Math & Pre-Algebra › Multiplying Decimals

Multiplying Decimals

To multiply decimals, multiply as if there were no decimal points, then put the point back: the answer has as many decimal places as the two factors together. This lesson explains that rule, multiplying by powers of ten, estimating, and how Decimal handles prices times quantities and tax rates.

The rule

  1. Ignore the decimal points and multiply the whole numbers.
  2. Count the decimal places in both factors together.
  3. Give the answer that many decimal places.
2.4×0.3524×35=840places: 1+2=3answer: 0.840=0.84\begin{aligned} &2.4 \times 0.35 \\ &24 \times 35 = 840 \\ &\text{places: } 1 + 2 = 3 \\ &\text{answer: } 0.840 = 0.84 \end{aligned}

Why it works: 2.4=24102.4 = \frac{24}{10} and 0.35=351000.35 = \frac{35}{100}, so the product is 24×3510×100=8401000\frac{24 \times 35}{10 \times 100} = \frac{840}{1000}. The denominators multiply, so the decimal places add up.

Problem Whole-number product Places Answer
0.3×0.20.3 \times 0.2 6 2 0.06
1.5×41.5 \times 4 60 1 6.0
0.07×0.90.07 \times 0.9 63 3 0.063
12.5×0.0812.5 \times 0.08 1000 3 1.000=11.000 = 1

Note: 0.3×0.2=0.060.3 \times 0.2 = 0.06, not 0.6. Multiplying two numbers smaller than 1 gives something smaller than both, just like with fractions.

Multiplying by 10, 100, 1000

Each factor of 10 moves the decimal point one place to the right:

3.142×10=31.423.142×100=314.23.142×1000=31420.05×1000=50\begin{aligned} 3.142 \times 10 &= 31.42 \\ 3.142 \times 100 &= 314.2 \\ 3.142 \times 1000 &= 3142 \\ 0.05 \times 1000 &= 50 \end{aligned}

Multiplying by 0.1, 0.01, 0.001 moves it to the left: 64×0.01=0.6464 \times 0.01 = 0.64. That is the same as dividing by 100. Moving the point is how scientific notation works.

Estimate to place the point

Round each factor to one significant digit: 4.87×21.3≈5×20=1004.87 \times 21.3 \approx 5 \times 20 = 100. The exact product 103.731 is close; 10.3731 or 1037.31 would mean a misplaced point.

Decimal places in Python's Decimal

Decimal follows the paper rule exactly: the result's exponent is the sum of the factors' exponents.

python · try it yourself
from decimal import Decimal as D

print(D("2.4") * D("0.35"))
print(D("0.3") * D("0.2"))
print(D("12.5") * D("0.08"))
print(D("3.142") * 100)

print(0.3 * 0.2)          # float: close, not exact
print(1.1 * 1.1)
0.840
0.06
1.000
314.200
0.06
1.2100000000000002

Notice D("2.4") * D("0.35") printed 0.840 with three places, exactly what the rule predicts. The float 1.1 * 1.1 shows the usual binary error.

Price×quantity\text{Price} \times \text{quantity}, and tax

A typical invoice line is unit price×quantity\text{unit price} \times \text{quantity}, then a tax rate on top. Multiplication produces more decimal places than money has, so you round to cents at a defined point (rounding itself is covered in Rounding and Repeating Decimals):

python · try it yourself
from decimal import Decimal, ROUND_HALF_UP

CENT = Decimal("0.01")
lines = [("notebook", "3.49", 4), ("pen", "1.25", 3), ("bag", "18.90", 1)]
rate = Decimal("0.0825")          # 8.25 % sales tax

subtotal = Decimal("0")
for name, price, qty in lines:
    amount = Decimal(price) * qty
    subtotal += amount
    print(f"{name:9} {qty} x {price:>6} = {amount:>7}")

tax = (subtotal * rate).quantize(CENT, rounding=ROUND_HALF_UP)
print("subtotal:", subtotal)
print("tax raw: ", subtotal * rate, " rounded:", tax)
print("total:   ", subtotal + tax)
notebook  4 x   3.49 =   13.96
pen       3 x   1.25 =    3.75
bag       1 x  18.90 =   18.90
subtotal: 36.61
tax raw:  3.020325  rounded: 3.02
total:    39.63

The raw tax 36.61×0.0825=3.02032536.61 \times 0.0825 = 3.020325 has 2+4=62 + 4 = 6 decimal places, again the counting rule. quantize(CENT) rounds it to whole cents.

In software

  • Invoices and carts: unit price×quantity×(1+tax rate)\text{unit price} \times \text{quantity} \times (1 + \text{tax rate}). Where exactly you round (per line or on the total) is a business rule, and tests must check it with exact Decimal values.
  • Unit scaling: converting 2.54 cm per inch×12.5 inches2.54\ \text{cm per inch} \times 12.5\ \text{inches}, or pixels×device-pixel-ratio 1.5\text{pixels} \times \text{device-pixel-ratio } 1.5, is decimal multiplication.
  • Fixed-point arithmetic: some games and embedded systems store numbers as integers scaled by 1000 (or 2162^{16}). Multiplying two such numbers gives a result scaled by 100021000^2, so the code divides by 1000 once, the integer version of "add the decimal places".

Exercises

Exercise 1: Count the places

Compute 0.6×0.040.6 \times 0.04 and 3.5×2.23.5 \times 2.2 by hand.

Answer

0.024 and 7.7

Solution
0.6×0.04:6×4=24, places 1+2=3→0.0243.5×2.2:35×22=770, places 1+1=2→7.70=7.7\begin{aligned} 0.6 \times 0.04{:}&\quad 6 \times 4 = 24,\ \text{places } 1 + 2 = 3 && \to 0.024 \\ 3.5 \times 2.2{:}&\quad 35 \times 22 = 770,\ \text{places } 1 + 1 = 2 && \to 7.70 = 7.7 \end{aligned}

Exercise 2: Powers of ten

Compute 0.0072×10000.0072 \times 1000 and 45.6×0.0145.6 \times 0.01.

Answer

7.2 and 0.456

Solution

×1000\times 1000 moves the point 3 places right: 0.0072→7.20.0072 \to 7.2. ×0.01\times 0.01 moves it 2 places left: 45.6→0.45645.6 \to 0.456.

Exercise 3: Fuel cost

A car uses 6.4 litres of fuel per 100 km. Fuel costs 1.85 per litre. What does fuel for 250 km cost?

Answer

29.60

Solution
litres=6.4×2.5=16(250 km is 2.5×100 km)cost=16×1.85=29.60\begin{aligned} \text{litres} &= 6.4 \times 2.5 = 16 && (250\ \text{km is } 2.5 \times 100\ \text{km}) \\ \text{cost} &= 16 \times 1.85 = 29.60 \end{aligned}
python · try it yourself
from decimal import Decimal as D
print(D("6.4") * D("2.5") * D("1.85"))
29.6000

Decimal kept every place the rule produces: 6.4×2.5=16.006.4 \times 2.5 = 16.00 (1+11 + 1 places), then ×1.85\times 1.85 gives 2+2=42 + 2 = 4 places, 29.6000. In money terms that is 29.60.

Exercise 4: Fixed-point multiply

Store prices as integers in thousandths (3.250→32503.250 \to 3250). Write fx_mul(a, b) that multiplies two such numbers and returns a result in thousandths (truncating). Test 3.250×1.2003.250 \times 1.200.

Answer

3900 (meaning 3.900)

Solution

3250×1200=3 900 0003250 \times 1200 = 3\,900\,000, which is scaled by 1000×10001000 \times 1000. Divide by 1000 once to get back to thousandths: 3900.

python · try it yourself
SCALE = 1000

def fx_mul(a, b):
    return a * b // SCALE

r = fx_mul(3250, 1200)
print(r, "->", r / SCALE)
3900 -> 3.9

Test yourself

What is 0.5×0.50.5 \times 0.5?

  1. 2.5
  2. 0.25
  3. 0.025
  4. 1.0

How many decimal places does 1.25×0.0031.25 \times 0.003 have before dropping trailing zeros?

  1. 2
  2. 3
  3. 6
  4. 5

What is 7.25×1007.25 \times 100?

  1. 0.0725
  2. 72.5
  3. 725
  4. 7250