Numbers & representations

Prime Number Calculator

Check primes, factor integers, list divisors and generate neighboring primes with strict input validation.

Stays in your browserFiles and text are processed in this tab.
Prime Number CalculatorLocal processing
Enter at least one value.
Ctrl / ⌘ + Enter

Numbers & representations

How it works

A prime is an integer greater than 1 with exactly two positive divisors: 1 and itself. Zero and one are neither prime nor composite.

What you can do

Check multiple integers, find prime factors and positive divisors, or classify perfect, abundant and deficient numbers by the sum of proper divisors. Generate primes or find the previous and next prime.

How to use it

  1. Choose an operation and enter integers separated by whitespace, commas or semicolons. Generation uses the starting value and count settings instead of the input box.
  2. Calculate, inspect the result details, then copy or download TXT. Ctrl/⌘ + Enter also calculates. Editing clears old results; Undo restores input and settings.

Errors and limits

Inputs must be whole integers from 0 to 10¹². Factors need n ≥ 2; divisors and classification need n ≥ 1. Generation allows 1000 primes, includes a prime starting value and never searches past 10¹². Previous and next exclude the input itself.

Fibonacci membership checks nonnegative integers up to 100 digits by testing squares 5n²±4. Divisor-class generation scans at most 200,000 integers up to 1,000,000 and may return fewer than requested; the searched interval is shown. Proper-divisor sums: almost-perfect n−1, perfect n, abundant >n, deficient <n.

Limits: 100,000 input characters per box, 100 digits per numeric token, 200 input values and 200,000 output characters. Fraction numerators and denominators and sequence terms are limited to 5000 digits. Scientific notation is not accepted.

Calculations run in a separate browser worker. Cancel stops the job; the 8-second time limit also covers worker loading. Try a smaller batch after a timeout.

Frequently asked questions

Is 1 a prime number?

No. It has only one positive divisor. For example, checking 1 returns neither prime nor composite. A perfect number, such as 6, equals the sum of its proper positive divisors: 1 + 2 + 3.

Are my numbers uploaded?

No. File reading and calculation happen in this browser. Input is not stored in the URL or sent to a calculation service. Text files must be UTF-8.

Related tools