Math Core

Module 3.6 · Number Theory

Units digits

The units digit of a number is its remainder when divided by 1010. That makes units-digit questions a special kind of remainder problem, and one of the most common number theory questions on MATHCOUNTS and the AMC 8. The key fact: only units digits affect units digits.

Only the last digit matters

When you add or multiply, the units digit of the answer depends only on the units digits of the inputs. For 347×86347 \times 86, the units digit is the units digit of 7×6=427 \times 6 = 42, which is 22. The tens, hundreds and higher digits only affect the higher digits of the result.

So in any units-digit problem, you can replace every number by its last digit right away: 202652026^{5} has the same units digit as 656^5.

Powers cycle

Here are the units digits of the first few powers of each digit.

Last digitUnits digits of powersCycle length
0,1,5,60, 1, 5, 6always 00, 11, 55, 6611
444,6,4,6,…4, 6, 4, 6, \dots22
999,1,9,1,…9, 1, 9, 1, \dots22
222,4,8,6,…2, 4, 8, 6, \dots44
333,9,7,1,…3, 9, 7, 1, \dots44
777,9,3,1,…7, 9, 3, 1, \dots44
888,4,2,6,…8, 4, 2, 6, \dots44

Every cycle length divides 44. So for any last digit, the pattern repeats every 44 powers.

Units digit of a power

To find the units digit of ana^n (for n≥1n \ge 1), find the remainder when nn is divided by 44.

  • Remainder 1,2,31, 2, 3: use the 11st, 22nd or 33rd entry of the cycle for the last digit of aa.
  • Remainder 00: use the 44th entry (the last one in the cycle).

Common mistake

Remainder 00 means the end of the cycle, not "the units digit is 11" or "the 00th power." For 2202^{20}: 2020 leaves remainder 00, so use the 44th entry of 2,4,8,62, 4, 8, 6, which is 66.

Worked example: A single power

What is the units digit of 3453^{45}?

45=4⋅11+145 = 4 \cdot 11 + 1, remainder 11. The cycle for 33 is 3,9,7,13, 9, 7, 1, so use the 11st entry: 33.

Worked example: A sum of powers

What is the units digit of 220+330+7402^{20} + 3^{30} + 7^{40}?

  • 2202^{20}: 2020 leaves remainder 00, so the 44th entry of 2,4,8,62, 4, 8, 6: 66.
  • 3303^{30}: 3030 leaves remainder 22, so the 22nd entry of 3,9,7,13, 9, 7, 1: 99.
  • 7407^{40}: 4040 leaves remainder 00, so the 44th entry of 7,9,3,17, 9, 3, 1: 11.

Add the units digits: 6+9+1=166 + 9 + 1 = 16. The units digit is 66.

Worked example: A tower of exponents

What is the units digit of 3333^{3^3}?

A tower is read from the top down: 333=3273^{3^3} = 3^{27}. Since 27=4⋅6+327 = 4 \cdot 6 + 3, use the 33rd entry of 3,9,7,13, 9, 7, 1: the units digit is 77.

For a much taller tower, you only need the exponent's remainder when divided by 44. Find that with remainder rules.

Tip

A product that includes a factor ending in 55 and an even factor ends in 00. A product of only odd numbers that includes one ending in 55 ends in 55. Check for these before doing any work.

Practice

Practice 1

What is the units digit of 202620262026^{2026}?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 2

What is the units digit of 720267^{2026}?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 3

What is the units digit of 13×27×38×4413 \times 27 \times 38 \times 44?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 4

Which of the following can never be the units digit of a perfect square?

Practice 5

What is the units digit of 22026+320262^{2026} + 3^{2026}?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 6

What is the units digit of 1!+2!+3!+⋯+100!1! + 2! + 3! + \dots + 100!?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 7

What is the units digit of 31+32+33+⋯+320263^1 + 3^2 + 3^3 + \dots + 3^{2026}?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 8

What is the units digit of 11+22+33+⋯+10101^1 + 2^2 + 3^3 + \dots + 10^{10}?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 9

What is the units digit of 17171717^{17^{17}}?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Real contest practice