Calculadora de Números Primos
- Created by
- Renato Passos, Eng. de Software
- Reviewed by
- Renato Passos, Eng. de Software
Last updated: Apr 18, 2026
Formula
primo: divisível apenas por 1 e por si mesmo
About this calculator
The Prime Number Calculator is an online tool that checks if a positive integer is prime or composite. If composite, it also returns the smallest prime divisor. The operation is simple: you enter a number, and the calculator tests divisibility by prime numbers up to the square root of the number, using the Sieve of Eratosthenes. If a divisor is found, the number is composite and the divisor is displayed; otherwise, it is prime.
This calculator is useful in various scenarios, such as solving basic math problems, number theory exercises, or checking primality for simple cryptography. Elementary and high school students can use it to verify their answers, while math enthusiasts can quickly test large numbers. It is also helpful for teachers demonstrating the concept of primality in the classroom.
When using the calculator, remember that it only handles positive integers. Negative numbers, decimals, or zero are not processed correctly. Additionally, very large numbers may require more processing time, though the tool is optimized for most cases. For numbers above 10 million, verification may take a few seconds. Ensure the entered number is within practical limits.
Frequently asked questions
What is a prime number?
A prime number is an integer greater than 1 that has exactly two divisors: 1 and itself. Examples: 2, 3, 5, 7, 11.
How does the calculator determine if a number is prime?
It tests division by prime numbers up to the square root of the number. If no divisor is found, the number is prime.
What does 'smallest prime divisor' mean?
It is the smallest prime number that exactly divides the composite number. For example, for 15, the smallest prime divisor is 3.
Does the calculator work with negative numbers?
No, it only accepts positive integers. Negative numbers and zero are not considered prime.
What is the maximum number I can test?
There is no theoretical limit, but numbers above 10 million may take a few seconds. It is recommended to use numbers up to 1 million for quick responses.