Prime Number Calculator

    Check whether a whole number is prime, composite, 0, or 1. Shows the smallest factor for composite numbers and links to full factorization.

    Up to 15 digits. Larger numbers usually need specialized primality tests.

    Check whether a number is prime or composite

    The English prime number calculator intent is a fast checker: enter a whole number and see whether it is prime, composite, or one of the special cases 0 and 1.

    If a factor d greater than 1 is found, the number is composite.

    1. Prime numbers are whole numbers greater than 1 with exactly two positive factors.
    2. Composite numbers are whole numbers greater than 1 with more than two positive factors.
    3. 0 and 1 are neither prime nor composite.

    Trial division used here

    This browser calculator uses explainable trial division through the square-root boundary. For very large integers, specialized tests such as Miller-Rabin are commonly used by competitor tools.

    NumberResult
    97Prime
    91Composite, smallest factor 7
    1Neither prime nor composite
    2Prime
    If the number is composite, use the prime factorization calculator for the complete factor breakdown.

    Frequently Asked Questions

    Sources and References

    Calculations are based on the listed reference sources. Links open in a new tab.

    Updated:

    Related Tools