How can I get a count of the total number of digits in a number? November 20, 2022 by Tarik Without converting to a string you could try Math.Floor(Math.Log10(n) + 1);