PrevNext

Overview

Many contest problems ask for the units digit, or last digit, of a very large number.

For example:

720267^{2026}

is far too large to work out directly. However, its units digit is easy to find because powers of 77 have a repeating last-digit pattern.

Units digit periodicity is the idea that powers of any integer eventually repeat in their units digits. This is really modular arithmetic modulo 1010.

Instead of studying the entire number, we only study its remainder modulo 1010.

Motivation

Consider the powers of 77:

71=77^1=7
72=497^2=49
73=3437^3=343
74=2401.7^4=2401.

The units digits are

7,9,3,1.7,9,3,1.

Now multiply by another 77:

757^5

has the same units digit as

71.7^1.

So the pattern repeats:

7,9,3,1,7,9,3,1,…7,9,3,1,7,9,3,1,\ldots

This means we do not need to compute 720267^{2026}. We only need to know where 20262026 falls in the repeating cycle.

Since the cycle length is 44 and

2026≡2(mod4),2026\equiv 2 \pmod 4,

the units digit is the second digit in the cycle:

9.9.

Units Digits and Modulo 1010

The units digit of an integer is its remainder when divided by 1010.

For example,

347≡7(mod10),347\equiv 7 \pmod{10},

so the units digit of 347347 is 77.

As such finding the units digit of a number is the same as finding the number modulo 1010.

For powers, this means

an(mod10)a^n \pmod{10}

determines the units digit of ana^n.

Reducing the Base

When finding the units digit of a power, only the units digit of the base matters.

For example,

1372026137^{2026}

has the same units digit as

72026,7^{2026},

because

137≡7(mod10).137\equiv 7 \pmod{10}.

So before doing anything else, reduce the base modulo 1010.

Why Cycles Appear

There are only ten possible units digits:

0,1,2,3,4,5,6,7,8,9.0,1,2,3,4,5,6,7,8,9.

When we repeatedly multiply by the same base and only keep track of the units digit, we have to eventually repeat a digit.

Once a digit repeats in the same position of the multiplication process, the cycle continues forever.

For units digit problems, these cycles are usually very short.

Common Units Digit Cycles

The following cycles are worth knowing.

Powers Ending in 00

If a number ends in 00, then every positive power also ends in 00:

0,0,0,…0,0,0,\ldots

Powers Ending in 11

If a number ends in 11, then every positive power also ends in 11:

1,1,1,…1,1,1,\ldots

Powers Ending in 22

The units digits cycle as

2,4,8,6.2,4,8,6.

Powers Ending in 33

The units digits cycle as

3,9,7,1.3,9,7,1.

Powers Ending in 44

The units digits cycle as

4,6.4,6.

Powers Ending in 55

If a number ends in 55, then every positive power also ends in 55:

5,5,5,…5,5,5,\ldots

Powers Ending in 66

If a number ends in 66, then every positive power also ends in 66:

6,6,6,…6,6,6,\ldots

Powers Ending in 77

The units digits cycle as

7,9,3,1.7,9,3,1.

Powers Ending in 88

The units digits cycle as

8,4,2,6.8,4,2,6.

Powers Ending in 99

The units digits cycle as

9,1.9,1.

Using the Cycle Length

Once we know the cycle, we reduce the exponent modulo the cycle length.

For example, the powers of 33 have units digit cycle

3,9,7,1.3,9,7,1.

This cycle has length 44.

To find the units digit of

3100,3^{100},

we compute

100≡0(mod4).100\equiv 0 \pmod 4.

A remainder of 00 means we use the last digit in the cycle, not the first.

Therefore, the units digit is

1.1.

This is a common source of mistakes.

Worked Examples

Example 1

Find the units digit of

72026.7^{2026}.

The powers of 77 have units digit cycle

7,9,3,1.7,9,3,1.

The cycle length is 44.

Now

2026≡2(mod4).2026\equiv 2 \pmod 4.

So we take the second digit in the cycle.

Therefore, the units digit is

9.9.

Example 2

Find the units digit of

2381.23^{81}.

First reduce the base:

23≡3(mod10).23\equiv 3 \pmod{10}.

So we need the units digit of

381.3^{81}.

The powers of 33 have cycle

3,9,7,1.3,9,7,1.

The cycle length is 44, and

81≡1(mod4).81\equiv 1 \pmod 4.

So we take the first digit in the cycle.

Therefore, the units digit is

3.3.

Example 3

Find the units digit of

2123+7456.2^{123}+7^{456}.

First, find the units digit of

2123.2^{123}.

The powers of 22 cycle as

2,4,8,6.2,4,8,6.

Since

123≡3(mod4),123\equiv 3 \pmod 4,

the units digit of 21232^{123} is

8.8.

Now find the units digit of

7456.7^{456}.

The powers of 77 cycle as

7,9,3,1.7,9,3,1.

Since

456≡0(mod4),456\equiv 0 \pmod 4,

the units digit of 74567^{456} is

1.1.

Therefore, the units digit of the sum is the units digit of

8+1=9.8+1=9.

So the final units digit is

9.9.

Example 4

Find the units digit of

17832349.17^{83}23^{49}.

First reduce the bases:

17≡7(mod10)17\equiv 7 \pmod{10}

and

23≡3(mod10).23\equiv 3 \pmod{10}.

So we need the units digit of

783349.7^{83}3^{49}.

For 7837^{83}, the cycle is

7,9,3,1.7,9,3,1.

Since

83≡3(mod4),83\equiv 3 \pmod 4,

the units digit of 7837^{83} is

3.3.

For 3493^{49}, the cycle is

3,9,7,1.3,9,7,1.

Since

49≡1(mod4),49\equiv 1 \pmod 4,

the units digit of 3493^{49} is

3.3.

Thus the units digit of the product is the units digit of

3(3)=9.3(3)=9.

So the units digit is

9.9.

Example 5

Find the units digit of

33100.3^{3^{100}}.

The powers of 33 have cycle

3,9,7,1,3,9,7,1,

with cycle length 44.

So we need to know the exponent

31003^{100}

modulo 44.

Since

3≡−1(mod4),3\equiv -1 \pmod 4,

we have

3100≡(−1)100≡1(mod4).3^{100}\equiv (-1)^{100}\equiv 1 \pmod 4.

Therefore, the exponent leaves remainder 11 modulo 44.

So

331003^{3^{100}}

has the same units digit as the first term in the cycle for powers of 33.

Thereofre the units digit is

3.3.

Expressions With Sums and Products

When an expression contains several large powers, find the units digit of each part separately.

For sums, add the resulting units digits and reduce modulo 1010.

For products, multiply the resulting units digits and reduce modulo 1010.

For example, if one term has units digit 88 and another has units digit 77, then their product has units digit equal to the units digit of

8(7)=56,8(7)=56,

which is

6.6.

Higher Powers in the Exponent

Sometimes the exponent itself is large, such as in

25100.2^{5^{100}}.

In such problems, first find the cycle length of the base.

The powers of 22 have cycle length 44:

2,4,8,6.2,4,8,6.

So we need the exponent modulo 44.

Then compute

5100(mod4).5^{100}\pmod 4.

Since

5≡1(mod4),5\equiv 1 \pmod 4,

we get

5100≡1(mod4).5^{100}\equiv 1 \pmod 4.

Therefore, the exponent corresponds to the first position in the cycle, so the units digit of

251002^{5^{100}}

is

2.2.

Key Contest Insight

Units digit problems are modular arithmetic problems modulo 1010.

The main steps are:

  • Reduce the base modulo 1010
  • Identify the repeating cycle
  • Reduce the exponent modulo the cycle length
  • Choose the correct position in the cycle
  • Combine units digits carefully for sums or products

The most important detail is how to handle exponent remainders. If the exponent is divisible by the cycle length, use the last digit of the cycle.

Strategy Tips

  • Reduce the base to its units digit first
  • Memorise the short cycles for digits 00 through 99
  • For cycles of length 44, reduce the exponent modulo 44
  • For cycles of length 22, reduce the exponent modulo 22
  • If the exponent is itself large, reduce it modulo the cycle length
  • For a remainder of 00, use the final term of the cycle
  • Treat sums and products by combining units digits at the end

Common Pitfalls

  • Using the first term of a cycle when the exponent is divisible by the cycle length
  • Forgetting to reduce the base modulo 1010
  • Trying to compute the full power instead of using the cycle
  • Mixing up the cycles for 33 and 77
  • Forgetting to reduce the exponent modulo the cycle length
  • In expressions with several terms, combining the bases before finding their units digits

Practice Problems

StatusSourceProblem NameDifficultyTags

Module Progress:

Join the Discord Community!

Stuck on a problem, or don't understand a module? Join the Discord and get help with your doubts while making more math friends.

PrevNext