The number 1 is not prime because a prime is defined as an integer greater than 1 with exactly two positive divisors, itself and 1. The number 1 has only one positive divisor, so it fails that test. This is not an arbitrary exclusion: allowing 1 would break the unique factorization theorem, the guarantee that every whole number above 1 is built from primes in exactly one way.
That answer sounds tidy, but the reasoning behind it runs through the history of arithmetic, the algebra of divisibility, and a practical convention that keeps cryptography and number theory consistent. Mathematicians did not wake up one day and decide to banish 1. They adopted a definition that makes the rest of the subject work, and 1 is the price. This explainer covers the mechanism behind that definition, the edge cases people get wrong, and the concrete reasons a working mathematician treats 1 as a unit rather than a prime.
The divisor-count mechanism
Every whole number can be sorted by how many positive divisors it has. A divisor is any integer that divides the number with no remainder. The number 12 has six positive divisors: 1, 2, 3, 4, 6, and 12. The number 7 has exactly two: 1 and 7. The number 1 has exactly one: 1 itself.
A prime is an integer strictly greater than 1 whose only positive divisors are 1 and the number itself. That single clause, greater than 1, does most of the work. The number 1 is excluded before the divisor test even starts. If you skip the clause, the divisor test still fails for 1, because it has one divisor, not two.
The definition relies on a clean distinction between three classes of whole numbers. The number 1 sits alone as the multiplicative identity, the element that leaves every other number unchanged when multiplied. A prime has exactly two divisors. A composite number has more than two, because it factors into smaller whole numbers each greater than 1. The number 4 has divisors 1, 2, and 4, so it is composite. The number 1 has one divisor and fits none of the prime or composite categories.
This is the level where most encyclopedia entries stop. The deeper question is why the definition was built this way. The answer lives in unique factorization.
Unique factorization and the collapse of one
The fundamental theorem of arithmetic states that every integer greater than 1 factors into primes in exactly one way, ignoring the order of the factors. The number 84 equals 2 times 2 times 3 times 7, and no other multiset of primes multiplies to 84. That uniqueness is the engine behind fractions, least common multiples, modular arithmetic, and the security of RSA encryption.
Suppose 1 were prime. Then 84 could be written as 2 times 2 times 3 times 7, or as 1 times 2 times 2 times 3 times 7, or with any number of extra 1s inserted. Factorization would stop being unique. Every statement that depends on a single canonical prime decomposition would need a patch. The fundamental theorem would not vanish, but it would need a clause saying decomposition is unique up to multiplication by units, and 1 is the unit.
Mathematicians avoid that patch by defining 1 out of the primes. The technical name for 1 is a unit, an element with a multiplicative inverse. In the integers, the only units are 1 and -1, because each equals its own inverse. Primes are defined as non-unit elements whose only divisors are units and themselves, scaled by a unit. That formulation, common in abstract algebra, treats 1 and -1 as special rather than prime.
The counterintuitive detail is that uniqueness survives only because 1 is a unit nonzero and invertible. In the ring of integers, 1 is the multiplicative identity, and any element that divides 1 is itself a unit. Factoring out a unit changes the representation without changing the number. The definition of prime in a general ring is deliberately built to exclude units, and the whole-integer definition inherits that design.
Quantified context: how rare primes are and where 1 sits
The primes thin out as numbers grow, and the counts give a sense of scale. There are 4 primes below 10, 25 below 100, 168 below 1,000, and 1,229 below 10,000. The prime-counting function, often written as π(n), grows roughly like n divided by the natural logarithm of n. At one million, the count is 78,498. At one billion, it is about 50.8 million. Each of those primes, by definition, is at least 2.
The number 1 sits outside the counting entirely. When π(n) counts primes up to n, it never includes 1. If you ask how many integers below 100 are either prime or 1, you get 26, not 25. That one extra item is the identity, not a prime, and every table that lists primes starts at 2.
A practical illustration is the sieve of Eratosthenes, the classic algorithm for finding primes. The sieve starts by marking multiples of 2, then 3, then 5, and so on. The number 1 is never used as a starting marker because it has no multiples other than itself. Running the sieve from 1 would produce no new crossings and accomplish nothing. The algorithm implicitly assumes the first prime is 2.
The same logic appears in cryptographic key generation. RSA and similar systems rely on the difficulty of factoring a large number into two large primes. If 1 counted as a prime, every key would have infinitely many prime factorizations once you inserted 1s, and the factoring problem would lose its clean statement. The security argument never treats 1 as a usable factor, because multiplying by 1 adds nothing and hides no information.
One unit system throughout: all counts above are counts of integers, not measurements, so no conversion applies. The numbers are exact where cited and approximate where the prime-counting estimate is used.
Comparison table: identity, prime, and composite
The cleanest way to see why 1 is excluded is to compare its properties side by side with a prime and a composite number.
| Property | 1 (unit) | 7 (prime) | 12 (composite) |
|---|---|---|---|
| Positive divisors | 1 | 1, 7 | 1, 2, 3, 4, 6, 12 |
| Divisor count | 1 | 2 | 6 |
| Greater than 1 | No | Yes | Yes |
| Product of smaller integers above 1 | None | None | 2 × 2 × 3 |
| Multiplicative inverse in integers | Yes (itself) | No | No |
| Role in unique factorization | Unit, ignored | Atomic factor | Product of primes |
The table makes the gap visible. The number 1 has fewer divisors than any prime, not more, and it behaves as an identity rather than a building block. A prime is atomic, meaning it cannot be split into smaller whole numbers each above 1. The number 1 is not atomic in that sense, because there is nothing smaller to split into, and its inverse property marks it as a unit.
The comparison also exposes a common confusion. People often think 1 should be prime because it is only divisible by 1 and itself. But the phrase "itself and 1" describes one divisor when the number is 1, not two. The divisor count is the test, and 1 scores lowest.
A short history of the definition
The status of 1 was not always settled in the modern way. Early Greek mathematics, including Euclid around 300 BCE, defined a prime as a number measured by a unit alone, and Euclid treated the unit as separate from number. The number 1 was not a number in that framework, so it was never a candidate for prime. The exclusion was built into the vocabulary from the start.
| Period | View of 1 | Consequence |
|---|---|---|
| Euclid, c. 300 BCE | Unit, not a number | Excluded from primes by definition |
| Medieval Islamic mathematics | Unit distinct from number | Prime lists began at 2 |
| 18th–19th century | Debated by some authors | Occasional inclusion in older texts |
| Late 19th century | Standardized as non-prime | Unique factorization stated cleanly |
| 20th century to present | Unit, definitively non-prime | Universal convention in number theory |
Some older texts, including a few from the 18th and 19th centuries, did list 1 as prime. That usage faded as the fundamental theorem of arithmetic became the organizing principle of number theory. A definition that makes the theorem awkward cannot survive once the theorem is central. By the early 20th century, the convention was fixed, and modern textbooks treat 1 as neither prime nor composite.
The takeaway is that the definition is a convention chosen for mathematical convenience, not a discovered fact about 1. It is, however, a convention so well matched to the structure of arithmetic that changing it would cost far more than it gains. That is the professional caveat worth stating: the exclusion is a definitional choice, and definitions are judged by the theorems they make possible.
Misconceptions and edge cases
The most common misconception is that 1 is prime because it has no divisors other than 1 and itself. The fix is to count divisors rather than describe them. One divisor is not two.
A second misconception is that 1 is composite because it is not prime. Composite numbers are defined as integers greater than 1 with more than two divisors. The number 1 fails the greater-than-1 clause, so it is not composite either. The number 1 is neither, and that is a complete classification, not a gap.
A third misconception treats 0 as a special case of the same rule. Zero is not prime, and the reasons are different. Zero has infinitely many divisors, because every nonzero integer divides 0 with no remainder. Zero is also not a unit, since it has no multiplicative inverse. The number 1 is excluded by its divisor count; zero is excluded by having too many.
Red-flag warnings for anyone reasoning about primes:
Do not start a prime list at 1. Tables, sieves, and software libraries all begin at 2, and starting at 1 breaks every count. Do not call 1 composite as a shortcut. The composite category requires more than two divisors and a value above 1. Do not rely on the phrase "divisible only by 1 and itself" alone. It is ambiguous for the number 1 and is the source of most confusion. Do not assume the definition holds unchanged in every number system. In general rings, primes are defined relative to units, and that definition is what makes 1 a non-prime everywhere.
Edge cases extend to negative numbers. The integer -7 is not prime under the standard definition, because primality is defined for positive integers above 1. In abstract algebra, -7 is associate to 7 and is treated as prime in rings where the definition is adapted to units. The integer 1 remains a unit in both settings.
Another edge case involves the number 2, the only even prime. The number 2 passes every test, since its divisors are 1 and 2, and it is greater than 1. Some people overcorrect after learning 1 is excluded and start wondering whether 2 is special enough to exclude too. It is not; 2 is prime by the same definition.
Practical actions for students and programmers
The definition matters in code, in coursework, and in any argument that leans on factorization. Concrete steps keep those applications correct.
In any primality test, return false for any input below 2 before the divisor loop begins. This single check handles 1, 0, and all negative inputs. When generating a prime list or running a sieve, initialize the list with 2 and mark multiples starting at 2 squared. Never seed with 1. In factorization code, divide out factors from 2 upward and stop when the remaining value is 1. Treat 1 as the terminating identity, not as a factor. In proofs, state the fundamental theorem of arithmetic for integers greater than 1 and note that units are excluded. That phrasing prevents the non-uniqueness error. In textbook or teaching contexts, present 1 as the multiplicative identity, separate from both primes and composites, and give the divisor-count test explicitly.
A threshold worth remembering: the primality condition is n greater than 1 and exactly two positive divisors. Both parts matter. A test that checks only the divisor count will misclassify 1 as having one divisor and reject it correctly, but a test that checks only the greater-than-1 clause will miss composites. Use both.
For programmers, the practical consequence is that off-by-one errors in prime code almost always trace to failing to guard the lower bound. A loop that starts at 1 and tests divisibility will mark 1 as prime unless the guard is present. Add the guard once and the rest of the loop follows.
Limitations of the definition and what it does not settle
The definition of prime settles the status of 1 but does not answer every question people bring to it. It does not tell you why 1 gets special treatment beyond the factorization argument, and that argument itself is a choice about what to value. Other mathematical structures define prime-like elements differently, and the whole-integer convention is one instance of a broader pattern.
The exclusion also does not help with questions that are genuinely open, such as whether infinitely many twin primes exist or how primes distribute at very large scales. Those problems concern the primes above 1, and the status of 1 is settled and irrelevant to them. Treating 1 as prime would not advance any of them.
Finally, the definition is a human convention with a strong track record. It is not derived from a deeper physical truth, and no experiment can overturn it. The right posture is to understand what the convention buys and to use it consistently. The number 1 is the identity of multiplication; primes are the atoms of multiplication; the two roles are different, and the definition keeps them apart.