Is 37 a prime number?

    Is your number prime? Enter any integer 2 or above - the calculator checks primality, lists all divisors and optionally finds every prime up to that number.

    Is 37 a prime number? The calculator will give you the answer instantly - and if it is not prime, it will show the complete factorization into prime factors and list all divisors of the number.

    Parameters

    Enter data for calculations

    Enter a natural number >= 2

    Check to list all primes from 2 to the entered number

    Form progress0 / 1 fields

    💡 Fill in all required fields to unlock the calculate button

    What this calculator does

    Enter a number and get three things at once: whether it is prime, a complete list of its divisors, and optionally every prime number from 2 up to your input. No formulas to remember - just type and read.

    Quick start
    Type 97 and click "Check primality". Result: YES - 97 is prime (divisors: 1, 97 only). Check "Find all primes in range" to see all 25 primes from 2 to 97.

    What is a prime number?

    A prime number is a natural number greater than 1 that has no positive divisors other than 1 and itself. The number 6 is not prime because 6 = 2 x 3. The number 7 is prime because nothing divides it evenly except 1 and 7.

    The fundamental theorem of arithmetic states that every integer greater than 1 can be represented uniquely as a product of prime numbers. Primes are the building blocks of all natural numbers.

    First 50 prime numbers

    Position Prime Position Prime Position Prime
    1st 2 11th 31 21st 73
    2nd 3 12th 37 22nd 79
    3rd 5 13th 41 23rd 83
    4th 7 14th 43 24th 89
    5th 11 15th 47 25th 97
    6th 13 16th 53 26th 101
    7th 17 17th 59 27th 103
    8th 19 18th 61 28th 107
    9th 23 19th 67 29th 109
    10th 29 20th 71 30th 113

    Practical examples

    Is 97 prime? Enter 97. Result: YES. Divisors: 1, 97. Only two divisors means prime. There are 25 primes between 2 and 97.
    97 is the 25th prime number
    Is 100 prime? Enter 100. Result: NO. Divisors: 1, 2, 4, 5, 10, 20, 25, 50, 100. Nine divisors - highly composite. 100 = 2 x 2 x 5 x 5.
    100 has 9 divisors - far from prime
    Is 2 prime? Enter 2. Result: YES. The smallest and only even prime number. Every other even number is divisible by 2, so none can be prime.
    2 is the only even prime - a unique case
    Is 561 prime? Enter 561. Result: NO. Divisors: 1, 3, 11, 17, 33, 51, 187, 561. This is a Carmichael number - it passes some primality tests but is actually composite (3 x 11 x 17).
    561 is the smallest Carmichael number - a "pseudoprime"
    Primes up to 50: Enter 50 with "Find all primes" checked. Result: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47 - that is 15 primes in the range 2-50.
    About 30% of numbers under 50 are prime

    How prime checking works

    The calculator uses trial division: it checks whether any integer from 2 to the square root of n divides n evenly. If none does, n is prime. Why only up to the square root? Because if n = a x b and both a and b are greater than the square root of n, then a x b > n - a contradiction.

    Method How it works Speed Used for
    Trial division Divide by every number up to the square root Slow Small numbers, education
    Sieve of Eratosthenes Mark multiples of each prime as composite Fast for ranges Finding all primes up to N
    Miller-Rabin Probabilistic test using modular exponentiation Very fast Cryptography (RSA key generation)
    AKS Deterministic polynomial-time test Theoretical Proof that PRIMES is in P (2002)

    Why primes matter

    Field How primes are used
    Cryptography (RSA) RSA encryption relies on the fact that multiplying two large primes is easy, but factoring the product back into primes is extremely hard. A 2048-bit RSA key uses primes with about 300 digits each.
    Hash tables Hash table sizes are often chosen as primes to minimize collisions. A prime modulus distributes keys more uniformly across buckets.
    Error detection Cyclic redundancy checks (CRC) use prime polynomials. ISBN check digits use modular arithmetic with prime bases.
    Random number generation Linear congruential generators use prime moduli to maximize the period (cycle length) of pseudo-random sequences.

    FAQ - Frequently Asked Questions

    Is 1 a prime number?
    No. By modern convention, 1 is neither prime nor composite. The definition requires exactly two distinct positive divisors (1 and itself). The number 1 has only one divisor (itself), so it does not qualify. This convention keeps the fundamental theorem of arithmetic clean - every integer has a unique prime factorization.
    Is there a largest prime number?
    No. Euclid proved around 300 BC that there are infinitely many primes. The proof is elegant: assume finitely many primes p1, p2, ... pn. Compute N = p1 x p2 x ... x pn + 1. N is not divisible by any pi (remainder is always 1), so N either is prime itself or has a prime factor not in the list - contradiction. As of 2024, the largest known prime is a Mersenne prime with over 41 million digits.
    What are twin primes?
    Twin primes are pairs of primes that differ by 2: (3,5), (5,7), (11,13), (17,19), (29,31), (41,43)... The twin prime conjecture - that there are infinitely many such pairs - remains unproven, making it one of the oldest open problems in mathematics.
    How does RSA encryption use primes?
    RSA picks two large primes p and q, computes n = p x q (the public modulus), and derives encryption/decryption keys from Euler's totient of n. Security relies on the difficulty of factoring n back into p and q. With current technology, factoring a 2048-bit number would take longer than the age of the universe using classical computers.
    What is the Sieve of Eratosthenes?
    An ancient algorithm (circa 240 BC) for finding all primes up to a limit N. Start with a list of numbers 2 to N. Take the first unmarked number (2), mark all its multiples as composite. Move to the next unmarked number (3), mark its multiples. Repeat until you reach the square root of N. All remaining unmarked numbers are prime. Time complexity: O(N log log N).
    How many primes are there below 1 million?
    There are 78,498 primes below 1,000,000. The prime counting function pi(x) grows approximately as x / ln(x) - this is the Prime Number Theorem. So about 1 in every 14 numbers near 1 million is prime, compared to 1 in 4 near 10.

    Related tools

    GCD & LCM Calculator

    Greatest common divisor and least common multiple - closely related to prime factorization - Open calculator ->

    Powers & Roots Calculator

    Mersenne primes have the form 2^p - 1 where p is itself prime - Open calculator ->

    Number System Converter

    Convert between decimal, binary, octal and hex - useful when working with prime-based hash functions - Open calculator ->

    Logarithm Calculator

    The prime counting function pi(x) approximates x/ln(x) - logarithms are central to prime distribution - Open calculator ->

    Percentage Calculator

    What percentage of numbers under N are prime? Use this to calculate the prime density - Open calculator ->

    Calculator verified by the LiczGrupa.pl team

    Content, formulas and results have been reviewed for accuracy and relevance by our team of specialists.

    Natalia Skrzek

    Reviewed by: Natalia Skrzek