Mathematica > Number Digits >

IntegerLength

IntegerLength[n]
gives the number of digits in the base 10 representation of the integer n.
IntegerLength[n, b]
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:
In[1]:=
Click for copyable input
Out[1]=
 
The number of binary digits in 100!:
In[1]:=
Click for copyable input
Out[1]=
New in 6
© 2008 Wolfram Research, Inc. japanese.gif
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team