An Initiative by SAARTHI IAS
Maarg Manthan · Topic 14.8

Finding the Number of Digits in a Number Using Logarithms

Quantitative Aptitude › Logarithms, Surds and Indices · Topic 14.8

The number of digits in a positive integer N equals the integer part of log10 N plus 1. To count the digits of a large power such as 2100, multiply the exponent by the logarithm of the base, take the integer part, and add 1.

Share:
Finding the Number of Digits in a Number Using Logarithms - Quantitative Aptitude - MaargX UPSC Maarg Manthan

Quick Answer

The number of digits in a positive integer N equals the integer part of log10 N plus 1. To count the digits of a large power such as 2100, multiply the exponent by the logarithm of the base, take the integer part, and add 1.

At a Glance

  • Digits formula [log10 N] + 1
  • [ ] means The integer part
  • log 2 0.3010
  • log 3 0.4771
  • log 5 0.6990
  • log 7 0.8451

Where Does It Fit?

This topic applies the common logarithm from Common Logarithm (Base 10) and Natural Logarithm (Base e) and the power rule from Laws of Logarithms and the Change of Base Rule. The next topic, Surd Equations – Solving for the Unknown Variable, turns to equations that contain surds.

What Is the Digit-Count Formula?

In short: a number with n digits lies between 10n-1 and 10n, so its common logarithm lies between n – 1 and n. The integer part of the logarithm is called the characteristic, and the number of digits is the characteristic plus 1.

Number Logarithm Characteristic Digits
7 0.845 0 1
85 1.929 1 2
1000 3 3 4
12345 4.0915 4 5

Rule

  • Digits of N = [log10 N] + 1.
  • Use log Nk = k × log N for a large power.
  • Digits before the decimal point of a number between 0 and 1 are not counted this way.

The decimal part of the logarithm is the mantissa, and it depends only on the digits of the number and not on its size. Logarithm values to remember are given in the Glance box above.

How Do You Count the Digits of a Power or a Product?

In short: reduce the number to a product of primes, add the logarithms, and take the integer part.

Number Calculation Logarithm Digits
2100 100 × 0.3010 30.10 31
350 50 × 0.4771 23.855 24
540 40 × 0.6990 27.96 28
1220 20 × (2 × 0.3010 + 0.4771) 21.582 22
  • Powers of 2 and 5 together: 2a × 5b with a < b equals 10a × 5b-a, so the digits are a plus the digits of 5b-a.
  • Quick check: 210 = 1024 has 4 digits, and log value 10 × 0.3010 = 3.01 gives the integer part 3, plus 1, which is 4.
  • Precision: when the product lies very near a whole number, use four-place or more precise logarithm values.

What Else Does the Same Idea Tell You?

  • Leading digit: the antilog of the mantissa tells the first digits, so log 2100 = 30.10 gives about 100.10 = 1.26 × 1030, which starts with 1.
  • Zeroes after the decimal point: if log N = -k + f with 0 ≤ f < 1, then N has k – 1 zeroes after the decimal point.
  • Powers of 10: an exact power 10n has n + 1 digits, because its logarithm is exactly n.

Counting zeroes at the end of a number is a different technique, covered under factorials in Factorial Values and Number of Trailing Zeros in a Factorial.

Solved Examples

Example 1

Question: Find the number of digits in 2100. (log 2 = 0.3010)

  1. log 2100 = 100 × 0.3010 = 30.10.
  2. The integer part is 30.
  3. Digits = 30 + 1.

Answer: 31 digits.

Example 2

Question: Find the number of digits in 350. (log 3 = 0.4771)

  1. log 350 = 50 × 0.4771 = 23.855.
  2. The integer part is 23.
  3. Digits = 23 + 1.

Answer: 24 digits.

Example 3

Question: Find the number of digits in 540. (log 5 = 0.6990)

  1. log 540 = 40 × 0.6990 = 27.96.
  2. The integer part is 27.
  3. Digits = 27 + 1.

Answer: 28 digits.

Example 4

Question: Find the number of digits in 230 × 535.

  1. 230 × 535 = (2 × 5)30 × 55 = 1030 × 3125.
  2. 3125 has 4 digits, and 1030 adds 30 zeroes.
  3. Total digits = 4 + 30.

Answer: 34 digits.

Example 5

Question: Find the number of digits in 1220. (log 2 = 0.3010, log 3 = 0.4771)

  1. 12 = 22 × 3, so log 12 = 2 × 0.3010 + 0.4771 = 1.0791.
  2. log 1220 = 20 × 1.0791 = 21.582.
  3. Digits = 21 + 1.

Answer: 22 digits.

Shortcuts and Tricks

  • Memorise log 2 = 0.3010, log 3 = 0.4771, log 5 = 0.6990 and log 7 = 0.8451. Every number built from these primes can be counted quickly.
  • For 5n, use log 5 = 1 – log 2 = 0.6990.
  • Pair 2s and 5s to form tens. Each pair adds one zero and so one digit.
  • Multiply first, then take the integer part. Do not round the product before taking the integer part.
  • For a base like 15 or 12, split it into primes and add the logarithms.

Common Mistakes

  • Forgetting to add 1 to the integer part of the logarithm.
  • Rounding the logarithm up, so 27.96 becomes 28 and the count of digits becomes 29 instead of 28.
  • Using the natural logarithm with these base-10 values.
  • Counting the integer and decimal parts together for a number that is not an integer.
  • Not simplifying a product of powers of 2 and 5 before taking the logarithm.

Practice Questions

  1. How many digits are in 264?
  2. How many digits are in 720?
  3. How many digits are in 425?
  4. How many digits are in 1515?
  5. How many digits are in 210 × 512?

Answers: 1) 20; 2) 17; 3) 16; 4) 18; 5) 12.

Why Is This Topic Important?

What Comes Next?

The next topic is Surd Equations – Solving for the Unknown Variable. It solves equations in which the unknown sits under a root sign.

Key Terms and Formulas

  • Characteristic The integer part of a logarithm
  • Mantissa The decimal part of a logarithm
  • Common logarithm Logarithm to the base 10
  • Number of digits Characteristic plus 1 for a positive integer
  • Antilogarithm The number whose logarithm is given
  • Power rule log Nk = k log N

Exam Corner

Points to Remember

  • Digits = [log10 N] + 1.
  • log 2 = 0.3010, log 3 = 0.4771, log 5 = 0.6990, log 7 = 0.8451.
  • The integer part of the logarithm is the characteristic.
  • Each pair of 2 and 5 makes a 10 and adds one digit.
  • 10n has exactly n + 1 digits.

Do Not Confuse With

  • Characteristic vs mantissa The characteristic is the integer part, and the mantissa is the decimal part.
  • Digits vs trailing zeroes The digit count is from logarithms, and zeroes at the end come from factors of 10.
  • Common vs natural logarithm Digit counting uses base 10.
  • Integer part vs rounding Take the integer part, not the rounded value.

Memory Hook

Log, take the whole-number part, add one.

GS Relevance

Direct question type in SSC CGL and CAT: finding the number of digits of large powers and products using common logarithms.

Frequently Asked Questions

How do you find the number of digits in a number using logarithms?

The number of digits in a positive integer N equals the integer part of its common logarithm plus 1. For a large power such as 2 to the power 100, multiply 100 by log 2 which equals 0.3010 to get 30.10, take 30 and add 1 to get 31 digits.

What is the characteristic of a logarithm?

The characteristic of a common logarithm is its integer part, and the decimal part is the mantissa. For the number 2 to the power 100, the logarithm is 30.10, so the characteristic is 30 and the mantissa is 0.10, which gives 31 digits.

What logarithm values should I remember for digit questions?

The standard common logarithm values are log 2 equal to 0.3010, log 3 equal to 0.4771, log 5 equal to 0.6990 and log 7 equal to 0.8451. Any number built from these primes can be handled by adding their logarithms and taking the integer part.

How many digits does 2 to the power 30 times 5 to the power 35 have?

The product 2 to the power 30 times 5 to the power 35 equals 10 to the power 30 times 5 to the power 5, which is 3125 followed by thirty zeroes. The number has 4 plus 30, which is 34 digits, and no logarithm table is needed.

Does the digit formula work for numbers less than 1?

The formula counts digits of positive integers only. For a number between 0 and 1 the logarithm is negative, and its characteristic instead tells how many zeroes follow the decimal point before the first non-zero digit, so a different rule is used there.

PYQ Practice — Statement Analysis

1 2100 has 31 digits.
True

100 × 0.3010 = 30.10, so the digits are 30 + 1 = 31.

2 The number of digits of N is [log10 N], with no addition.
False

The number of digits is [log10 N] + 1.

3 540 has 28 digits.
True

40 × 0.6990 = 27.96, so the digits are 27 + 1 = 28.

4 210 × 512 has 12 digits.
True

It equals 1010 × 25, which is 25 followed by ten zeroes.

Share: