The Number Inspector takes any integer and exposes fifteen properties at once: its decimal, binary, octal and hexadecimal representations, whether it is prime or composite, even or odd, the digit sum and digit count, the full divisor list and prime factorisation, the square and cube roots, a perfect-square test and the value in scientific notation. It's designed for the moment you're staring at an ID, a bitmask, a hash chunk or an exam-style question and want every angle on it without opening a calculator and a base-converter and a factoriser separately.
Base conversions use the built-in Number.prototype.toString(radix) and are prefixed with 0b, 0o or 0x. The prime test is trial division up to √n, the divisor list pairs each i ≤ √n with n/i, and the prime factorisation pulls each smallest prime out repeatedly. All math runs on JavaScript double-precision Numbers, which means results are exact up to 2^53 − 1; above that, factor and divisor results become unreliable and the tool can't warn you, so keep inputs to about sixteen digits or fewer.
The tool uses trial division: it returns false for n < 2, true for 2, false for any other even number, then tests odd divisors from 3 up to the square root of n. This is fast and exact for the integers JavaScript can represent precisely (up to 2^53).
It works on JavaScript Numbers, so anything up to Number.MAX_SAFE_INTEGER (9,007,199,254,740,991, or 2^53 − 1) is exact. Above that, parseInt loses precision and the divisor and factorisation results may be wrong, so stick to inputs of about 16 digits or fewer.
All divisors are found by iterating i from 1 to sqrt(n) and pairing each i with n/i. Prime factorisation uses trial division starting at 2, dividing out each prime fully before moving on, so 360 is reported as 2 × 2 × 2 × 3 × 3 × 5 with the exact multiplicities.
Math.cbrt is defined for negative reals (cbrt(-8) = -2) so it is applied to the signed input. Math.sqrt of a negative is NaN, so the tool applies it to the absolute value and labels the row Square root accordingly.
Explore the full suite of Number tools and 290+ other free utilities at Chunky Munster.