This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

IntegerLength

IntegerLength[n]
gives the number of digits in the base 10 representation of the integer n.
IntegerLength
gives the number of digits in the base b representation of n.
  • Integer mathematical function, suitable for both symbolic and numerical manipulation.
Find the number of decimal digits in 123456789:
The number of binary digits in :
Plot it:
The IntegerLength for different bases:
Find the number of decimal digits in 123456789:
In[1]:=
Click for copyable input
Out[1]=
 
The number of binary digits in :
In[1]:=
Click for copyable input
Out[1]=
 
Plot it:
In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
 
The IntegerLength for different bases:
In[1]:=
Click for copyable input
Out[1]=
Find how the number of digits in decreases with the base:
New in 6