Find All Divisors
Find every divisor of any integer up to 1 billion - divisor count, sum, prime/perfect/abundant detection. Free, offline, client-side, instant, secure.
Enter any positive integer up to 1,000,000,000. The tool finds every divisor via the standard √n trick (O(√n) - about 31,623 iterations at the upper limit). Reports divisor count, sum, sum of proper divisors, and whether the number is prime, perfect, deficient, or abundant. Optionally view divisor pairs (a × b = n) instead of the flat list.
How to Use Find All Divisors
- Type a positive integer. Anything from 1 up to 1,000,000,000. The input is bounded - values above the cap show an error rather than freezing the browser.
- Choose a view. "Flat list" is the standard sorted output (1, 2, 3, …). "Pairs" shows divisor pairs (a × b = n) - useful when factoring or visualising rectangular tilings.
- Pick a separator for the flat list - comma+space, newline, or space. Switching re-renders the output immediately.
- Click Generate divisors or press Enter in the input. The output, badges, and stats line all update at once.
- Read the badges. Prime / perfect / deficient / abundant - plus the divisor count. Prime numbers have exactly 2 divisors (1 and themselves); perfect numbers equal the sum of their proper divisors (6, 28, 496, 8128, …); deficient/abundant compare that sum to the number itself.
- Inspect the stats line. N value, divisor count, sum of all divisors, sum of proper divisors (sum minus N), and abundance classification - everything you need for a number-theory homework problem.
- Copy or download. Copy uses the Clipboard API with an
execCommandfallback. Download TXT savesdivisors.txt. Ctrl/Cmd + Enter also generates.
Frequently Asked Questions
What’s the √n trick?
Divisors come in pairs: if d divides n, then so does n/d, and exactly one member of each pair is ≤ √n. So instead of looping from 1 to n (which would take a billion iterations for the upper limit), the tool loops from 1 to floor(√n) – about 31,623 iterations at the max – and pushes both i and n/i when i divides n. When i² = n (perfect square) we skip the duplicate.
What’s a prime number?
A positive integer greater than 1 whose only divisors are 1 and itself. So the divisor count is exactly 2. The tool detects this and shows a “prime” badge. (1 is not prime by convention – it has only 1 divisor.)
What’s a perfect number?
A positive integer that equals the sum of its proper divisors (divisors excluding itself). The first four are 6 (= 1+2+3), 28 (= 1+2+4+7+14), 496, and 8128. The tool detects perfect numbers and shows a “perfect number” badge. Perfect numbers below 1 billion are vanishingly rare – there are only five of them.
What do “deficient” and “abundant” mean?
Compare the sum of proper divisors (s) to the number n. If s < n, the number is deficient (most numbers are). If s = n, it’s perfect. If s > n, it’s abundant. 12 is the smallest abundant number: 1+2+3+4+6 = 16 > 12. The badge shows which class your number falls into.
Why is the maximum 1 billion?
It’s a UI-time bound, not a math limit. √(10⁹) ≈ 31,623 – a single tight loop runs in well under 10 ms in any modern JS engine. √(10¹⁸) would be 10⁹ iterations – about 5-10 seconds, which would freeze the page. If you need bigger numbers, run the same algorithm in a Web Worker or on the command line.
What does the “pairs” view show?
For each divisor pair (a, b) where a ≤ b and a × b = n, one line. For 12: 1 × 12, 2 × 6, 3 × 4. Useful for factoring intuition and for showing rectangular tilings (a 12-cell grid can be 1×12, 2×6, or 3×4).
How many divisors can a number have?
For typical numbers near a billion, the divisor count is small (most have 4-16 divisors). The “highly composite” numbers – those with more divisors than any smaller number – have the most. Examples: 60 has 12 divisors, 5040 has 60, 720720 has 240. Near 1 billion, the highly composite champion is 735134400 with 1344 divisors.
Is my data uploaded to a server?
No. The page is three static files (HTML, CSS, JS) and runs entirely in your browser using plain arithmetic. No fetch, no XHR, no analytics, no cookies. You can disconnect from the internet after the page loads and the tool still works.