---
title: "Prime Number Calculator — Check, List Primes, Prime Factorization"
description: "Check if a number is prime, list all primes up to N (Sieve of Eratosthenes), and find the prime factorization of any number. Explains primality testing algorithms used in cryptography worldwide."
url: "https://worldcalculators.org/calculators/prime-number/"
canonical: "https://worldcalculators.org/calculators/prime-number/"
---

# Prime Number Calculator

Check if a number is prime, list all primes up to N (Sieve of Eratosthenes), and find the prime factorization of any number. Explains primality testing algorithms used in cryptography worldwide.

## Quick answer

By modern mathematical convention, 1 is excluded from primes because including it would break the Fundamental Theorem of Arithmetic (every integer ≥ 2 has a unique prime factorization). If 1 were prime, 12 could be factored as 2²×3, or 1×2²×3, or 1×1×2²×3, giving infinitely many factorizations. The exclusion of 1 preserves uniqueness. Historically, some mathematicians (including Euclid) did consider 1 prime, but modern number theory standardised the definition around 1900. This is the same convention taught in all countries today.

## Frequently Asked Questions

By modern mathematical convention, 1 is excluded from primes because including it would break the Fundamental Theorem of Arithmetic (every integer ≥ 2 has a unique prime factorization). If 1 were prime, 12 could be factored as 2²×3, or 1×2²×3, or 1×1×2²×3, giving infinitely many factorizations. The exclusion of 1 preserves uniqueness. Historically, some mathematicians (including Euclid) did consider 1 prime, but modern number theory standardised the definition around 1900. This is the same convention taught in all countries today.
RSA-2048 (the current standard): uses two random prime numbers each with about 617 decimal digits (1,024 bits each). Their product (the public key modulus) has 2,048 bits. RSA-4096: primes of ~1,234 digits. Factoring a 2,048-bit number with current computers would take longer than the age of the universe. Quantum computers (if sufficiently large) could break RSA using Shor's algorithm — which is why post-quantum cryptography standards (NIST FIPS 203/204, 2024) are based on lattice problems instead of prime factorization. Used by GCHQ (UK), NSA (US), and all major banks and governments worldwide.

Source: https://worldcalculators.org/calculators/prime-number/
Markdown mirror of the HTML page. Prefer this URL for RAG; the interactive calculator still lives on the HTML page.
