Highly Composite Number Calculator

Check whether a number sets a new record for divisor count among all smaller integers.

Math and PercentUpdated 2026-11-182 min read
Highly Composite Number Calculator
A whole number from 1 to 100,000.
Divisor count of n
...
Earlier record...
Classification...

What it does

A highly composite number has more divisors than any smaller positive integer. The sequence begins 1, 2, 4, 6, 12, 24 and 36. Each entry is a new record holder for the divisor count, and the next entry must exceed it strictly rather than merely match it.

The concept was introduced by the mathematician Srinivasa Ramanujan, who studied these numbers alongside their close relatives, the superabundant numbers. They appear naturally when looking for integers with unusually many factors relative to their size.

Testing the property directly means counting divisors for every number up to n and keeping a running maximum. This page uses a sieve to compute all those counts in one pass, so the whole comparison is fast and exact for inputs up to one hundred thousand.

The output shows the divisor count of your number, the best count achieved by any smaller number and the resulting classification. A number with the same count as an earlier record is not highly composite, because the record was not broken.

The upper limit is chosen to keep the sieve small in a browser. Results are exact integers, and the tool reports a clear error outside the allowed range.

How to use

  1. Enter a whole number n from 1 to 100,000.
  2. Read the classification in the main result box.
  3. Check the divisor count of your number beside it.
  4. Compare with the earlier record to see why the verdict was reached.
  5. The default n = 12 reproduces the worked example.
  6. Try n = 24 to see another record holder, then n = 18 for a non example.

Formula

n is highly composite when d(n) > d(k) for every k with 1 <= k < n, where d(n) is the number of positive divisors of n
n
The candidate integer.
d(n)
The number of positive divisors of n.
d(k)
The divisor count of a smaller integer k.

The sieve marks each multiple of i as having i as a divisor, which builds every d value up to n in one pass. The running maximum of the earlier values is the earlier record. Equality with that record is not enough, because the definition requires a strict increase.

Worked example

Example: n = 12

The page opens with n = 12.

  1. Count divisors from 1 upward, keeping the best so far.
  2. The number 1 has 1 divisor, setting the first record.
  3. The number 2 has 2 divisors, a new record.
  4. The number 4 has 3 divisors, a new record.
  5. The number 6 has 4 divisors, a new record.
  6. The number 12 has 6 divisors, which beats 4.
  7. The tool reports 6 divisors, earlier record 4, and Highly composite.

Reference table

Early highly composite numbers
nDivisor countEarlier recordHighly composite
11n/aYes
221Yes
432Yes
643Yes
1264Yes
1866No
2486Yes

Limits

  • Inputs above 100,000 are rejected to keep the sieve fast.
  • Ties with an earlier record are treated as failures, following the strict definition.
  • The tool checks one number, it does not list the whole sequence up to n.
  • Only positive integers are considered.

Common mistakes

  • Treating a tie as a new record.
  • Comparing with the immediately previous integer rather than all smaller integers.
  • Confusing divisor count with the sum of divisors.
  • Assuming every even number is highly composite.
  • Counting only prime factors instead of all divisors.

Try it yourself

Quick checks. Answers sit tucked under each question.

Is 12 highly composite?

Yes. It has 6 divisors, beating the earlier record of 4 held by 6.

Is 18 highly composite?

No. It also has 6 divisors, which only ties the record set by 12.

Is 24 highly composite?

Yes. It has 8 divisors, a strict improvement on 6.

Questions

Who introduced these numbers?

Srinivasa Ramanujan studied them in his work on highly composite and related numbers.

Does a tie count?

No. The divisor count must be strictly greater than every earlier value.

How are divisor counts computed?

A sieve counts how many times each integer divides numbers up to n.

What is the first record holder after 12?

24, with 8 divisors.

Are results exact?

Yes. The sieve uses integer arithmetic only.

What is the largest input?

One hundred thousand.

Sources

How this page was checked. The formula above was matched against the cited sources, and the worked example was run through the tool on this page before publishing. If you spot an error, contact us so we can fix it and note the correction.