Staaarter

Find All Divisors of a Number

Finds every positive divisor of a positive integer using BigInt-safe trial division up to its square root, returned in ascending order. A free online tool from Staaarter, right in your browser.

Runs locallyUpdated 2026-08-05
By Staaarter Team
number-theorydivisibility

Overview

Introduction

Finding every divisor of a number by hand gets tedious fast once the number has more than a handful of factors, and it's easy to miss one.

This tool runs the full trial-division search for you and returns every positive divisor in ascending order, using BigInt arithmetic so even large inputs stay exact.

What Is Find All Divisors of a Number?

A calculator that lists every positive integer that evenly divides your input, from 1 up to the number itself.

It's the exhaustive-list companion to Prime Factor Finder, which instead reports only the number's prime factorization rather than every one of its divisors.

How Find All Divisors of a Number Works

The tool validates that the input is a whole positive integer, then converts it to a BigInt for exact arithmetic.

It loops a candidate divisor i from 1 up to the point where i × i exceeds the input, checking at each step whether the input is evenly divisible by i.

Whenever it finds a match, it records both i and the complementary divisor (input ÷ i), then sorts all the collected divisors in ascending order before joining them into the output list.

When To Use Find All Divisors of a Number

Use it whenever you need the complete divisor list of a number, for a factoring exercise, a GCD/LCM problem worked by hand, or checking whether a number is highly composite, perfect, or abundant.

For just the prime factorization instead of every divisor, use Prime Factor Finder; for a yes/no primality check, use Prime Number Checker.

Features

Advantages

  • Returns the complete, exact divisor list, not just the prime factorization.
  • Uses BigInt arithmetic throughout, so results stay exact right up to the 10^12 input cap.

Limitations

  • Input is capped at 10^12 to keep the square-root trial-division scan fast in the browser.
  • Only accepts positive integers; 0 and negative numbers aren't valid divisor-finding inputs.

Examples

Divisors of 12

Input

12

Output

1, 2, 3, 4, 6, 12

1×12, 2×6, and 3×4 are the three divisor pairs that multiply to 12.

Best Practices & Notes

Best Practices

  • For very large inputs near the 10^12 cap, expect the calculation to take a noticeably longer moment since the square-root scan grows with the input's size.

Developer Notes

The core loop is `for (let i = 1n; i * i <= n; i += 1n)`, checking `n % i === 0n` and pushing both `i` and `n / i` (skipping the duplicate when they're equal, i.e. at a perfect square). Everything runs on BigInt rather than `Number` so a full-precision result is guaranteed all the way up to the 10^12 cap, well past where ordinary floating-point division would start introducing rounding risk in comparisons.

Find All Divisors of a Number Use Cases

  • Working through a factoring or GCD/LCM problem by hand and needing a quick answer key
  • Checking whether a number is perfect, abundant, or deficient by summing its proper divisors
  • Verifying a divisor-finding function in your own code against a known-good reference list

Common Mistakes

  • Forgetting that 1 and the number itself both count as divisors and are always included in the output list.

Tips

  • To find only the proper divisors (excluding the number itself), drop the last value from the output list.

References

Frequently Asked Questions