Is 28 a Prime Number?

28 is the second perfect number, equal to the sum of 1, 2, 4, 7 and 14. Perfect numbers are strikingly rare — the next is 496 — and every known one is even and pairs with a Mersenne prime, in this case 7. It is not prime. 28 = 2 × 2 × 7, so it has 6 divisors rather than two, and the smallest factor ...

YOUR NUMBER

WORTH TRYING

28 IS

NOT PRIME

SMALLEST FACTOR

2

28 = 2^2 × 7 · and a perfect number: its proper divisors sum to itself

Prime factorisation

2^2 × 7

Number of divisors

6

Sum of divisors

56

Totient φ(n)

12

Previous prime

23

Next prime

29

FACTOR BREAKDOWN

PRIME

POWER

CONTRIBUTES

2

2

4

7

1

7

STEPS

1

Trial-divide 28 by every prime up to √28 ≈ 5 — beyond that a factor would have a partner below it

2

The smallest prime divisor is 2, so 28 is composite

3

Full factorisation: 2^2 × 7

4

28 is NOT prime

SIEVE OF ERATOSTHENES

READY — NOTHING CROSSED OUT YET99 LEFT1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001 is set aside — it is neither prime nor composite0 of 74 strikes

Two thousand years old and still the fastest way. Take the first uncrossed number, 2, and strike out every multiple of it. Move to the next survivor, 3, and repeat. Each pass can start at the square of its prime, because anything smaller was already struck by a smaller factor — which is why the passes get shorter and stop entirely once the prime exceeds √100. Whatever survives is prime. Your number 28 is outlined in gold.

HOW MANY PRIMES BELOW x — AND WHAT THE THEORY PREDICTS

10
4 vs 4
100
25 vs 22
1,000
168 vs 145
10,000
1,229 vs 1,086
100,000
9,592 vs 8,686

Actual count against x ÷ ln x. At x = 10 the estimate overshoots slightly; from 100 upward it runs low, and from 1,000 onward the gap narrows steadily — a ratio of 1.16 at a thousand down to 1.10 at a hundred thousand. That it tends to 1 at all is the Prime Number Theorem, and how slowly it does so is why the proof took a century to find.

Proved, not guessed. Primality here uses a deterministic Miller–Rabin test with a fixed witness set that is proven correct for every number this page accepts, so a result of PRIME is a proof rather than a probability. Ranges are sieved up to 200,000; single numbers are tested up to 4,503,599,627,370,495.

Live simulation · drawn to scale · updates as you type

Created with❤️byeaglecalculator.com

HOW TO USE

  1. 1

    The answer is already on screen: 28 is not prime, because 28 = 2 × 2 × 7. Nothing needs typing — this page opens the calculator with 28 loaded.

  2. 2

    Read the STEPS panel to see the reasoning: the smallest prime divisor of 28 is 2, which is enough to settle it, and the full factorisation 2^2 × 7 follows.

  3. 3

    Check the six tiles for the derived quantities — divisor count, divisor sum, Euler's totient and the primes either side. All of them come from the factorisation rather than from separate searches.

  4. 4

    Type a different number to carry on, or switch to RANGE to sieve a whole interval at once and see how the primes thin out as the numbers grow.

THE FORMULAS

Primeexactly two divisors: 1 and n
Trial division limittest primes up to √n only
Fundamental theoremn = p₁^a¹ × p₂^a² × … uniquely
Number of divisorsd(n) = Π (aᵢ + 1)
Sum of divisorsσ(n) = Π (pᵢ^(aᵢ+1) − 1)/(pᵢ − 1)
Euler totientφ(n) = n · Π (1 − 1/pᵢ)
Totient of a primeφ(p) = p − 1
Sieve pass startbegin each pass at p²
Prime Number Theoremπ(x) ≈ x ÷ ln x
Twin primesp and p + 2 both prime
Mersenne prime2^p − 1, with p itself prime
Perfect numberσ(n) − n = n

FREQUENTLY ASKED QUESTIONS

RELATED CALCULATORS

MORE NUMBER THEORY CALCULATORS

Was this calculator helpful?

Last updated: July 29, 2026 · Formula verified · Deterministic Miller–Rabin, so a result of PRIME is proven rather than probable · Eagle-eyed accuracy for every calculation.