Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools

Arithmetic Methods: Fractions, Divisibility, GCD, LCM and Modulo

Every arithmetic method on one page, from divisibility rules and prime factorization to GCD, LCM, every operation on fractions and modular arithmetic. Each method links to the arithmetic lesson section where its rule is explained.

Level
I

Divisibility rules

Atomic · one test, applied once
2 | n

How to test divisibility by 2

Divisibility rule for 2
Atomic
Recognize
You need to know whether a whole number is even, for example before halving it or factoring out a 22: 1,7461{,}746, 3,8213{,}821, 90,31890{,}318.
steps
1. Look only at the last digit.
2. If it is 0,2,4,60, 2, 4, 6 or 88, then 2∣n2 \mid n; if it is odd, nn leaves remainder 11.
Statement
2∣n  ⟺  the last digit of n is 0,2,4,6 or 82 \mid n \iff \text{the last digit of } n \text{ is } 0, 2, 4, 6 \text{ or } 8
worked example
3,7483{,}748 ends in 88, so 2∣37482 \mid 3748; 5,2915{,}291 ends in 11, so 2∤52912 \nmid 5291
3 | n

How to test divisibility by 3

Digit-sum rule for 3
Atomic
Recognize
You want to know whether 33 divides a number without dividing it: 729729, 1,2341{,}234, 5,8325{,}832.
steps
1. Add the digits of the number.
2. If the sum is still large, add its digits again.
3. The number is divisible by 33 exactly when the sum is.
Statement
3∣n  ⟺  3∣(sum of the digits of n)3 \mid n \iff 3 \mid (\text{sum of the digits of } n)
worked example
5,8325{,}832: 5+8+3+2=185 + 8 + 3 + 2 = 18, so 3∣58323 \mid 5832 (5832=3⋅19445832 = 3 \cdot 1944)
4 | n

How to test divisibility by 4

Last-two-digits rule for 4
Atomic
Recognize
You need to know whether 44 divides a number with three or more digits: 3,5163{,}516, 7,2307{,}230, 2,1342{,}134.
steps
1. Read the number formed by the last two digits.
2. If 44 divides that two-digit number, 44 divides the whole number.
Statement
4∣n  ⟺  4∣(number formed by the last two digits of n)4 \mid n \iff 4 \mid (\text{number formed by the last two digits of } n)
worked example
7,3127{,}312: 12=4⋅312 = 4 \cdot 3, so 4∣73124 \mid 7312; 7,3187{,}318: 4∤184 \nmid 18, so 4∤73184 \nmid 7318
5 | n

How to test divisibility by 5

Divisibility rule for 5
Atomic
Recognize
You want to know whether 55 divides a number, for example while factoring or simplifying a fraction: 4,8354{,}835, 7,8327{,}832, 990990.
steps
1. Look only at the last digit.
2. If it is 00 or 55, then 5∣n5 \mid n; otherwise 5∤n5 \nmid n.
Statement
5∣n  ⟺  the last digit of n is 0 or 55 \mid n \iff \text{the last digit of } n \text{ is } 0 \text{ or } 5
worked example
9,4859{,}485 ends in 55, so 5∣94855 \mid 9485 (9485=5⋅18979485 = 5 \cdot 1897)
6 | n

How to test divisibility by 6

Rule for 6: test 2 and 3
Atomic
Recognize
You need to know whether 66 divides a number: 1,2541{,}254, 1,2341{,}234, 4,5124{,}512. Since 6=2⋅36 = 2 \cdot 3 with gcd⁡(2,3)=1\gcd(2, 3) = 1, two quick tests decide it.
steps
1. Check that the last digit is even (the test for 22).
2. Check that the digit sum is divisible by 33.
3. Only if both tests pass is the number divisible by 66.
Statement
6∣n  ⟺  2∣n and 3∣n6 \mid n \iff 2 \mid n \text{ and } 3 \mid n
worked example
4,5124{,}512: even, and 4+5+1+2=124 + 5 + 1 + 2 = 12, so 6∣45126 \mid 4512 (4512=6⋅7524512 = 6 \cdot 752)
9 | n

How to test divisibility by 9

Digit-sum rule for 9
Atomic
Recognize
You want to know whether 99 divides a number: 8,1278{,}127, 4,8254{,}825, 6,4716{,}471. The digit sum also gives the remainder after division by 99.
steps
1. Add the digits of the number; repeat on the sum if it is large.
2. The number is divisible by 99 exactly when the digit sum is.
Statement
9∣n  ⟺  9∣(sum of the digits of n)9 \mid n \iff 9 \mid (\text{sum of the digits of } n)
worked example
6,4716{,}471: 6+4+7+1=186 + 4 + 7 + 1 = 18, so 9∣64719 \mid 6471 (6471=9⋅7196471 = 9 \cdot 719)
10 | n

How to test divisibility by 10

Divisibility rule for 10
Atomic
Recognize
You need to know whether 1010 divides a number, or whether both 22 and 55 do: 5,2305{,}230, 5,2355{,}235, 7,2507{,}250.
steps
1. Look only at the last digit.
2. If it is 00, then 10∣n10 \mid n; any other digit means 10∤n10 \nmid n.
Statement
10∣n  ⟺  the last digit of n is 010 \mid n \iff \text{the last digit of } n \text{ is } 0
worked example
7,2507{,}250 ends in 00, so 10∣725010 \mid 7250; 7,2057{,}205 ends in 55, so 10∤720510 \nmid 7205
11 | n

How to test divisibility by 11

Alternating-sum rule for 11
Atomic
Recognize
You want to know whether 1111 divides a number, for example while factoring: 9,2739{,}273, 5,8315{,}831, 143143.
steps
1. Starting from the last digit d0d_0, add and subtract the digits in turn: d0−d1+d2−⋯d_0 - d_1 + d_2 - \cdots.
2. If the result is 00 or a multiple of 1111 (negative is fine), then 11∣n11 \mid n.
Statement
11∣n  ⟺  11∣(d0−d1+d2−d3+⋯ )11 \mid n \iff 11 \mid (d_0 - d_1 + d_2 - d_3 + \cdots)
worked example
8,3498{,}349: 9−4+3−8=09 - 4 + 3 - 8 = 0, so 11∣834911 \mid 8349 (8349=11⋅7598349 = 11 \cdot 759)
II

Factors, fractions and remainders

Composite · each opens its own page
How to use the order of operationsEvaluate an expression with several operations: groups first, then powers, then ×\times and ÷\div left to right, then ++ and −- left to right.uses: parentheses · powers · left to right · sign rulesComposite4 steps · 3 examplesHow to find the prime factorization of a numberWrite a whole number as a product of primes: divide out 22, then 33, 55, 77, … until the quotient is 11, as in 360=23⋅32⋅5360 = 2^3 \cdot 3^2 \cdot 5.uses: divisibility rules · repeated division · prime numbersComposite5 steps · 3 examplesHow to find the GCD by prime factorizationFactor both numbers into primes and keep the shared primes with the smaller exponent: gcd⁡(72,120)=23⋅3=24\gcd(72, 120) = 2^3 \cdot 3 = 24.uses: prime factorization · minimum exponent · gcdComposite4 steps · 3 examplesHow to find the GCD with the Euclidean algorithmReplace the pair (a,b)(a, b) by (b,a mod b)(b, a \bmod b) until the remainder is 00; the last nonzero remainder is the GCD. No factoring needed.uses: division with remainder · gcdComposite4 steps · 3 examplesHow to find the least common multipleFind the smallest number that two or more numbers divide: take every prime with its larger exponent, or use lcm⁡(a,b)=a⋅bgcd⁡(a,b)\operatorname{lcm}(a, b) = \frac{a \cdot b}{\gcd(a, b)}.uses: prime factorization · maximum exponent · gcdComposite4 steps · 3 examplesHow to simplify fractionsReduce a fraction to lowest terms: divide the numerator and the denominator by their GCD, as in 84126=23\frac{84}{126} = \frac{2}{3}.uses: gcd · divisibility rules · equivalent fractionsComposite4 steps · 3 examplesHow to compare fractionsDecide which fraction is larger: compare numerators over a common denominator, or cross-multiply, ab>cd\frac{a}{b} > \frac{c}{d} when ad>bcad > bc.uses: cross-multiplication · common denominator · LCDComposite4 steps · 3 examplesHow to add and subtract fractionsRewrite the fractions over the least common denominator, add or subtract the numerators, keep the denominator, and simplify.uses: LCD · equivalent fractions · simplifyingComposite4 steps · 3 examplesHow to multiply fractionsMultiply numerators together and denominators together, ab×cd=acbd\frac{a}{b} \times \frac{c}{d} = \frac{ac}{bd}, cancelling common factors first.uses: cross-canceling · improper fractions · simplifyingComposite4 steps · 3 examplesHow to divide fractionsKeep the first fraction, change ÷\div to ×\times, flip the second fraction, then multiply: ab÷cd=ab×dc\frac{a}{b} \div \frac{c}{d} = \frac{a}{b} \times \frac{d}{c}.uses: reciprocal · keep change flip · multiplying fractionsComposite4 steps · 3 examplesHow to work with mixed numbersConvert between mixed numbers and improper fractions, wab=wb+abw\tfrac{a}{b} = \frac{wb + a}{b}, and use the conversion to multiply and divide them.uses: improper fractions · division with remainder · conversionComposite4 steps · 3 examplesHow to simplify complex fractionsSimplify a fraction whose top or bottom contains fractions: multiply both by the LCD of the inner denominators, or divide the top by the bottom.uses: LCD · dividing fractions · adding fractionsComposite4 steps · 3 examplesHow to do modular arithmeticFind the remainder of a sum, product or power: reduce each number mod nn first, operate on the remainders, reduce again; use cycles for powers.uses: remainders · congruence · power cyclesComposite4 steps · 3 examplesHow to find the modulo of a negative numberRound the quotient down, not toward zero, so the remainder lands in 0,…,n−10, \ldots, n - 1: (−38) mod 7=4(-38) \bmod 7 = 4 because −38=7⋅(−6)+4-38 = 7 \cdot (-6) + 4.uses: floored division · floor function · congruenceComposite4 steps · 3 examples
III

Word problems

recipes, distances, shares, parts of a whole