Sumivo · Mathematics

Factors of a Number Calculator

Find all the factors (divisors) of a whole number, shown as an ordered list and as factor pairs, with the factor count, sum, and whether the number is prime or perfect.

01 / inputs

integer

02 / result

FACTORS

1, 2, 3, 4, 6, 8, 12, 24

Number of factors
8
Sum of factors
60
Prime?
No
Perfect?
No

Calculation trace

  1. 1 × 24 = 24
    1
    Factor pair
  2. 2 × 12 = 24
    2
    Factor pair
  3. 3 × 8 = 24
    3
    Factor pair
  4. 4 × 6 = 24
    4
    Factor pair

Maintained by Jack Shi

§

How it works

A factor of a whole number divides it exactly, with no remainder. The tool finds every factor by testing each whole number d from 1 up to the square root of n: whenever d divides n, both d and n ÷ d are factors, so they are collected as a pair. That is why factors come in pairs — for 24, 1 × 24, 2 × 12, 3 × 8 and 4 × 6 — and why a perfect square such as 36 has an odd number of factors, since its square root pairs with itself. Stopping at the square root keeps the search fast even for large inputs.

Assumptions & limits

  • Defined for whole numbers of 1 or greater; zero, negatives, and decimals are rejected.
  • Lists positive factors only. 1 and the number itself are always included.
  • Inputs are capped at 1,000,000,000,000 so the search stays fast in the browser.

Verified runs

Synthetic examples executed at build revision be2e0e4 on . Cards round decimal results to 6 significant figures; matching uses full precision and the tolerance below. Matches cover the displayed fields, not every possible input or clinical or engineering validation.

  • Inputs: Integer: 12 integer

    Result: Factors: [1,2,3,4,6,12] positive integers; Count: 6 count (expected Factors: [1,2,3,4,6,12] positive integers; Count: 6 count) ✓

  • Inputs: Integer: 1 integer

    Result: Factors: [1] positive integers; Count: 1 count (expected Factors: [1] positive integers; Count: 1 count) ✓

  • Inputs: Integer: 36 integer

    Result: Factors: [1,2,3,4,6,9,12,18,36] positive integers; Count: 9 count (expected Factors: [1,2,3,4,6,9,12,18,36] positive integers; Count: 9 count) ✓

How these runs were checked

Method: factors-list@1.0.0. Expectations come from the listed test fixtures or hand arithmetic; they are not copied from these executions. Omitted optional inputs use the method defaults. Run dates record execution, not expert review or fresh measurements.

Download all verified runs (JSON) — full inputs, returned values, expectations, timestamps and buildRevision.

  • normal: . Absolute tolerance: 1e-10. Text and booleans match exactly. Full-precision result: Factors: [1,2,3,4,6,12] positive integers; Count: 6 count. Expected: Factors: [1,2,3,4,6,12] positive integers; Count: 6 count. Expectation: packages/calculator-core/tests/factors-list.test.ts
  • boundary: . Absolute tolerance: 1e-10. Text and booleans match exactly. Full-precision result: Factors: [1] positive integers; Count: 1 count. Expected: Factors: [1] positive integers; Count: 1 count. Expectation: packages/calculator-core/tests/factors-list.test.ts
  • sensitivity: . Absolute tolerance: 1e-10. Text and booleans match exactly. Full-precision result: Factors: [1,2,3,4,6,9,12,18,36] positive integers; Count: 9 count. Expected: Factors: [1,2,3,4,6,9,12,18,36] positive integers; Count: 9 count. Expectation: packages/calculator-core/tests/factors-list.test.ts

Reproduce from the source checkout with pnpm --filter @sumivo/web gen:verified-runs. A rebuild changes execution times; the revision identifies its Git starting point, including any uncommitted changes made for that build.

§

FAQ

What is a factor of a number?
A factor is a whole number that divides another whole number exactly, leaving no remainder. For 12 the factors are 1, 2, 3, 4, 6 and 12.
Are factors and divisors the same thing?
Yes — for positive whole numbers the terms are used interchangeably. The factors of 20 are 1, 2, 4, 5, 10 and 20, and those are also its divisors.
Why do factors come in pairs?
Because if d divides n, then n ÷ d also divides n, so each small factor has a partner. 24 gives the pairs 1 × 24, 2 × 12, 3 × 8 and 4 × 6.
Why does a perfect square have an odd number of factors?
The square root pairs with itself rather than a different number, so it is counted once. 36 has 9 factors because 6 × 6 contributes a single 6.
What is a perfect number?
A number that equals the sum of its proper factors — every factor except itself. 6 = 1 + 2 + 3 and 28 = 1 + 2 + 4 + 7 + 14 are the first two perfect numbers.
§

Related calculators

§

SOURCES

  • OpenStax, Rice University
    Prealgebra 2e ↗

    Factors and divisibility: finding all factors of a whole number

    Accessed 2026-09-02