Russian Peasant Multiplication
Multiply two whole numbers by halving and doubling, with every row of the table and the kept terms shown.
Russian Peasant Multiplication
Multiply two whole numbers by halving and doubling, with every row of the table and the kept terms shown.
How this page computes
All arithmetic is BigInt, so the table and the product are exact. Each factor is capped at fifteen digits because the page prints one row per halving.
The calculation runs entirely in this browser tab; nothing is uploaded.
The page multiplies two non-negative whole numbers by halving the first and doubling the second until the first reaches zero, keeping the second value whenever the first is odd. For 13 and 11 the kept terms are 11, 44 and 88, which sum to 143.
Every row of the table is printed with a keep marker, so the method is visible rather than summarised. Either factor may be zero, in which case the product is zero and no rows are needed.
How to use the Russian Peasant Multiplication
Enter the two whole numbers separated by a space or comma, then press Run. Each row shows the halved value, the doubled value and whether the row is kept.
The last line is the product. The kept rows are the ones where the halved value is odd, and their doubled values are the terms that sum to the answer.
The rule this page applies
Russian peasant multiplication is binary multiplication written out: halving the first factor reads its bits from the bottom, and doubling the second shifts it left. Summing the rows whose first value is odd is exactly the sum of the shifted powers.
All arithmetic is BigInt, so the table and the product are exact. Each factor is capped at fifteen digits because the page prints one row per halving.
What to Expect
Best for
- Teaching a non-decimal multiplication method
- Checking the method by hand
- Multiplying without a times table
Not ideal for
- Decimal factors
- Negative factors
- Factors longer than fifteen digits
What this tool keeps
- Every row of the halving and doubling table
What may need cleanup
- Nothing: the kept terms and the product are exact
Common errors
- A negative factor is refused, because the table is written for non-negative values
- A factor above fifteen digits is refused with the display limit named
Example use cases
- Multiply 13 by 11
- See that zero gives a zero product
Sample input
13 11
Sample output
13 11 keep 6 22 3 44 keep 1 88 keep 13 × 11 = 143
Who this is for
- Students learning alternative algorithms
- Readers interested in binary arithmetic
Frequently asked questions
Why keep the odd rows?
An odd value has a one in its lowest binary bit, so its doubled partner belongs in the product. Halving removes that bit, and the kept terms are the shifted powers that add up to the answer.
Does the order of the factors matter?
The product is the same either way, but the number of rows follows the first factor's halvings. The page uses the order typed so the table matches what the visitor entered.
Why are negative numbers refused?
The halving table is defined for non-negative values; halving a negative number toward zero does not read off binary bits the same way. The page states the restriction instead of printing a misleading table.
Is anything uploaded?
Nothing is uploaded. The numbers are read and the arithmetic runs in this browser tab with JavaScript, and reloading the page discards both the input and the result.
Build custom tools for your store
Join the SDK program to create useful ecommerce utilities for your store.