BUILDING & PLANNING · FIELD TOOL

Prime Number Calculator

A prime number has exactly two factors: 1 and itself. To check a number, try dividing it by every whole number up to its square root. 97 is prime because none of 2, 3, 5 or 7 divides it (√97 = 9.85), but 91 is not, because 91 = 7 × 13. There are 25 primes below 100.

Inputs

Results update as you type.

Numbers
Prime numbers shaded on a gridPrimes from 1 to 1002357111317192329313741434753596167717379838997myconstructioncalculator.com
Diagram updates as you type.

Results

Check the working before you order.

Is 97 prime?
Yes, it is prime
Prime factors97
Previous prime89
Next prime101
Price This optional: add your own prices

Your prices are remembered on this device only.

Send Order WhatsApp, SMS or email to your supplier
Include
Working
  1. Only divisors up to √97 = 9.85 need testing (2, 3, 5, 7, … up to 9).
  2. None of them divides 97 exactly, so it is prime: its only factors are 1 and 97.

Results are estimates for planning and material ordering only. They are not a substitute for structural design or approval by a qualified engineer. Read the full disclaimer.

Formula

n is prime if n ≥ 2 and no whole number from 2 to √n divides it exactly
Listing primes: cross out multiples of each prime (sieve of Eratosthenes)

Worked Example

Is 91 prime?

  1. √91 = 9.54, so try 2, 3, 5 and 7
  2. 91 ÷ 7 = 13 exactly
  3. 91 is not prime: 91 = 7 × 13

How Many Primes There Are

Up to Number of primes
10 4
100 25
1,000 168
10,000 1,229
100,000 9,592
1,000,000 78,498

Frequently Asked Questions

How do you check if a number is prime?

Divide it by each prime up to its square root. If none divides exactly, it is prime. For 97 you only need to try 2, 3, 5 and 7, because √97 is under 10.

Is 1 a prime number?

No. A prime has exactly two different factors, and 1 has only one. The first prime is 2.

Why is 2 the only even prime?

Every other even number can be divided by 2, so it has at least three factors: 1, 2 and itself.

What are the prime numbers from 1 to 100?

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89 and 97: 25 primes.

What is a composite number?

A whole number above 1 that is not prime, so it has more than two factors. 91 is composite: 1, 7, 13 and 91.

Embed This Calculator on Your Website

Free for any website: contractors, suppliers, blogs and schools. Paste this code where you want the calculator to appear. It works in WordPress (Custom HTML block), Wix, Squarespace and plain HTML.

Preview
All Building & Planning Calculators