How this calculator works
A factor divides a number without remainder. Trial divisors up to the square root reveal both members of each factor pair. A perfect-square middle factor is included once. Negative inputs are treated by magnitude; the listed positive factors also describe the magnitudes of their negative factors.
Formula
If n mod d = 0, then d and n/d are factors. Check 1 <= d <= sqrt(n). Common factors belong to both factor lists.
Worked example
24 has positive factors 1, 2, 3, 4, 6, 8, 12, 24. The common factors of 24 and 36 are 1, 2, 3, 4, 6, 12.
Advertisement
Frequently asked questions
Why is zero rejected?
Every non-zero integer divides zero, so there is no finite complete factor list.
Is 1 prime?
No. It has one positive factor, while a prime has exactly two: 1 and itself.
Why is there an input limit?
Trial division grows with the square root of the magnitude. The limit bounds the work while keeping all arithmetic within exact safe integers.