Unit Digit and Last Two Digits of Powers and Products
Quantitative Aptitude › Number System · Topic 1.4
The unit digit of a power depends only on the unit digit of the base and on the power taken modulo the cycle length. The last two digits of a power can be found by the cycle of the number modulo 100, or by the binomial shortcut for numbers ending in 1.
6 min read · Quantitative Aptitude · Number System
Quick Answer
The unit digit of a power depends only on the unit digit of the base and on the power taken modulo the cycle length. The last two digits of a power can be found by the cycle of the number modulo 100, or by the binomial shortcut for numbers ending in 1.
At a Glance
- Unit digit of a product Product of the unit digits
- Cycle of 2, 3, 7, 8 Length 4
- Cycle of 4, 9 Length 2
- 0, 1, 5, 6 Unit digit never changes
- Last two digits Remainder modulo 100
- Shortcut (10a + 1)^n ends in 1 with tens digit (a × n) mod 10
Where Does It Fit?
This topic follows Divisibility Rules for 2 to 19 and uses remainders on division by 10 and 100. It leads to Cyclicity of Numbers in Finding Unit Digits, where the cycles are studied in more detail, and to Remainder Theorem and Chinese Remainder Theorem, which gives the general remainder method.
What Is the Unit Digit of a Product?
In short: only the unit digits matter. Multiply the unit digits of all factors and take the unit digit of the result.
- For 123 × 456 × 789, the unit digits are 3, 6 and 9. 3 × 6 = 18 has unit digit 8, and 8 × 9 = 72 has unit digit 2.
- The actual product is 4,42,53,432, whose unit digit is 2.
- If any factor ends in 0, the product ends in 0. If one factor ends in 5 and another is even, the product ends in 0.
What Are the Unit Digit Cycles of Powers?
In short: the unit digits of the powers of any number repeat in a fixed cycle, so you only need the remainder of the power divided by the cycle length.
| Unit digit of base | Cycle of unit digits | Length |
|---|---|---|
| 0, 1, 5, 6 | The same digit forever | 1 |
| 2 | 2, 4, 8, 6 | 4 |
| 3 | 3, 9, 7, 1 | 4 |
| 4 | 4, 6 | 2 |
| 7 | 7, 9, 3, 1 | 4 |
| 8 | 8, 4, 2, 6 | 4 |
| 9 | 9, 1 | 2 |
If the remainder of the power divided by 4 is 0, take the last number in the cycle. So the unit digit of 7123: 123 ÷ 4 leaves 3, so the unit digit is the third in the cycle 7, 9, 3, 1, which is 3.
How Do You Find the Last Two Digits of a Power?
In short: the last two digits are the number modulo 100. For numbers co-prime to 100, the cycle repeats every 20 powers, and for many bases the cycle is shorter.
| Base | Pattern of last two digits |
|---|---|
| Ends in 1 | For (10a + 1)n, the last digit is 1 and the tens digit is (a × n) mod 10 |
| 7 | 74 ends in 01, so the cycle is 4 |
| 3 | 320 ends in 01, so the cycle is 20 |
| 24 | Odd powers end in 24, even powers end in 76 |
| 25 | Every power ends in 25 |
| 76 | Every power ends in 76 |
| 5 | Every power from the second onward ends in 25 |
For 3145, a = 3 and n = 45, so the tens digit is 3 × 45 = 135, whose last digit is 5. The last two digits are 51. For 172023, 2023 ÷ 20 leaves 3, so the answer equals that of 173 = 4,913, which ends in 13.
Solved Examples
Example 1
Question: Find the unit digit of 7123.
- The cycle for 7 is 7, 9, 3, 1, of length 4.
- 123 ÷ 4 leaves remainder 3.
- The third number in the cycle is 3.
Answer: 3.
Example 2
Question: Find the unit digit of 22026.
- The cycle for 2 is 2, 4, 8, 6.
- 2026 ÷ 4 leaves remainder 2.
- The second number in the cycle is 4.
Answer: 4.
Example 3
Question: Find the last two digits of 72026.
- 74 = 2,401, which ends in 01.
- 2026 = 4 × 506 + 2, so 72026 has the same last two digits as 72.
- 72 = 49.
Answer: 49.
Example 4
Question: Find the last two digits of 3145.
- 31 = 10 × 3 + 1, so a = 3.
- The tens digit is (3 × 45) mod 10 = 135 mod 10 = 5.
- The last digit is 1.
Answer: 51.
Example 5
Question: Find the last two digits of 172023.
- 17 is co-prime to 100, so the powers repeat in a cycle that divides 20.
- 2023 = 20 × 101 + 3, so the last two digits equal those of 173.
- 173 = 4,913.
Answer: 13.
Shortcuts and Tricks
- For unit digit questions, reduce the base to its unit digit first.
- If the remainder on division by the cycle length is 0, use the last item of the cycle.
- For last two digits of numbers ending in 1, use the tens digit formula (a × n) mod 10.
- Memorise that 24odd ends in 24 and 24even ends in 76, and that 25 and 76 keep their own last two digits.
- For bases co-prime to 100, reduce the power modulo 20 before calculating.
Common Mistakes
- Using the whole base instead of its unit digit when finding the unit digit.
- Treating a remainder of 0 as the first item of the cycle instead of the last.
- Applying the cycle length 4 to bases 4 and 9, whose cycle length is 2.
- Using the 10a + 1 shortcut for numbers that do not end in 1.
- Forgetting that the last two digits of 5n are 25 only for n ≥ 2.
Practice Questions
- Find the unit digit of 32024.
- Find the unit digit of 123 × 456 × 789.
- Find the last two digits of 4137.
- Find the last two digits of 8112.
- Find the last two digits of 32024.
- Find the last two digits of 246.
Answers: 1) 1; 2) 2; 3) 81; 4) 61; 5) 81; 6) 76.
Why Is This Topic Important?
- Frequent One or two questions on unit or last two digits appear in many aptitude papers.
- Pattern thinking Teaches how cycles reduce huge powers to small ones.
- Link to remainders Is a special case of Remainder Theorem and Chinese Remainder Theorem.
- Link to cyclicity Extended in Cyclicity of Numbers in Finding Unit Digits.
What Comes Next?
The next topic is Number of Factors, Sum of Factors and Product of Factors of a Number, which counts and sums the factors of a number from its prime factorization.
Key Terms and Formulas
- Unit digit Last digit of a number
- Cycle Repeating block of unit digits of powers
- Modulo 100 Remainder on division by 100
- Co-prime to 100 Having no factor 2 or 5
- Tens digit Second digit from the right
- Power Repeated multiplication
Related Topics
- Divisibility Rules for 2 to 19
- Number of Factors, Sum of Factors and Product of Factors of a Number
- Classification of Numbers (Natural, Whole, Integers, Rational, Irrational and Real Numbers)
- Face Value and Place Value of Digits
Exam Corner
Points to Remember
- Unit digit of a product = unit digit of the product of the unit digits.
- Cycle lengths: 4 for 2, 3, 7, 8; 2 for 4, 9; 1 for 0, 1, 5, 6.
- Remainder 0 means the last item of the cycle.
- (10a + 1)n ends in 1 with tens digit (a × n) mod 10.
- 24odd ends in 24 and 24even ends in 76.
Do Not Confuse With
- Unit digit vs last two digits The unit digit is modulo 10; the last two digits are modulo 100.
- Cycle of 4 vs cycle of 9 4 and 9 have cycle length 2; 2, 3, 7, 8 have cycle length 4.
- Remainder 0 vs remainder 1 Remainder 0 gives the last item of the cycle; remainder 1 gives the first.
- Odd power vs even power of 24 Odd powers end in 24 and even powers end in 76.
Memory Hook
Reduce the base to its unit digit, reduce the power to the cycle, then read off the answer.
GS Relevance
Frequently Asked Questions
How do you find the unit digit of a large power?
To find the unit digit of a large power, take the unit digit of the base and find its cycle of unit digits. Divide the power by the cycle length and use the remainder to pick the position in the cycle. If the remainder is 0, use the last number of the cycle.
What is the unit digit cycle of 7?
The unit digits of the powers of 7 follow the cycle 7, 9, 3, 1 and repeat every four powers. So the unit digit of 7 to the power n depends on n divided by 4. For example, 7 to the power 123 leaves remainder 3, so its unit digit is 3.
How do you find the last two digits of a number ending in 1 raised to a power?
For a number 10a plus 1, raised to the power n, the last digit is 1 and the tens digit is the last digit of a times n. For example, 31 to the power 45 has a equal to 3, so the tens digit is the last digit of 135, which is 5, giving 51.
What are the last two digits of 7 to the power 2026?
The last two digits of 7 to the power 2026 are 49. The reason is that 7 to the power 4 is 2,401, which ends in 01, so the powers of 7 repeat every four steps in the last two digits. Since 2026 leaves remainder 2 on division by 4, the answer equals 7 squared.
Why does the unit digit of a product depend only on unit digits?
The unit digit of a product depends only on the unit digits because any number is a multiple of 10 plus its unit digit, and multiples of 10 add nothing to the unit digit of a product. So multiplying the unit digits and taking the last digit of that result gives the answer.
PYQ Practice — Statement Analysis
1 The unit digit of 7123 is 3.
The cycle is 7, 9, 3, 1 and 123 leaves remainder 3 on division by 4.
2 The last two digits of 25n are always 25 for n ≥ 1.
Multiplying a number ending in 25 by 25 gives a number ending in 25.
3 The unit digit of 4n repeats in a cycle of length 4.
The cycle of 4 is 4, 6 and has length 2.
4 The last two digits of 3145 are 51.
The tens digit is (3 × 45) mod 10 = 5.
Related Topics
Browse the full Quantitative Aptitude index