If you mean the number of digits, this is roughly equivalent to the logarithm (base 10) of the number. However, it's a bit more tricky to find an exact expression. Rounding the logarithm up helps, but you will still be off by one, for exact powers of 10.
Chat with our AI personalities
If you have a number with digits ABCD, you could represent it by 1000*A + 100*B + 10*C + D.
Using the digits 12279, the largest number that can be represented is 97,221.
7654321
1023459
1023
145,689