Percentage Calculator
Calculate what percent A is of B, find X% of a number, percentage change or add a percent to a value. Fast percentage calculator online, free.
Enter any natural number (from 2 to 1,000,000,000) and choose a mode: primality check, finding the next prime, or prime factorization. The calculator instantly shows the result and whether the entered number is prime.
For primality checking, we use trial division: we check whether n is divisible by any number from 2 to √n. If not — the number is prime. For factorization, we iteratively divide the number by consecutive divisors starting from 2. The algorithm correctly handles numbers up to 1,000,000,000.
Enter 17 and choose the "check" mode. The calculator confirms that 17 is prime (divisible only by 1 and 17). The "next prime" mode will show 19. The "factorization" mode for 12 returns the factor 2 (factorization: 2 × 2 × 3).
A prime number is a natural number greater than 1 that is divisible only by 1 and itself. Examples: 2, 3, 5, 7, 11, 13, 17, 19. The number 2 is the only even prime. Numbers like 4, 6, 9, and 15 are not prime because they have other divisors.
The simplest method is trial division: divide the number n by all integers from 2 to √n. If none divides n evenly, the number is prime. For n=17, we check divisors up to √17 ≈ 4.1 — none of 2, 3, 4 divides 17, so 17 is prime. Our calculator uses this method.
The largest known prime (as of 2024) is the Mersenne prime 2^136,279,841 − 1, discovered by the GIMPS project. It has over 41 million digits. The search for ever-larger primes is an active area of mathematics and computing.
Euclid proved around 300 BC that there are infinitely many primes. The prime number theorem states that the number of primes less than n is approximately n / ln(n). Below 1,000 there are 168 primes; below 1,000,000 — as many as 78,498.
Every natural number greater than 1 can be uniquely written as a product of prime numbers (up to ordering). For example: 12 = 2 × 2 × 3, 30 = 2 × 3 × 5, 100 = 2 × 2 × 5 × 5. This is called the Fundamental Theorem of Arithmetic.
The Sieve of Eratosthenes is an ancient algorithm for finding all primes up to a given limit. Start with 2 and cross out all its multiples; then move to the next uncrossed number and repeat. Numbers that remain uncrossed are prime. The method is efficient for limits up to several million.
No — 1 is not a prime number. Historically it was sometimes included, but the modern definition excludes it because including 1 would break the Fundamental Theorem of Arithmetic (factorizations would no longer be unique: e.g., 6 = 2×3 = 2×3×1 = 2×3×1×1…).
Twin primes are pairs of primes that differ by 2, e.g., (3, 5), (11, 13), (17, 19), (29, 31), (41, 43). The twin prime conjecture states that there are infinitely many such pairs, but this remains unproven — one of the great open problems in mathematics.
Prime numbers are the foundation of cryptography. The RSA algorithm relies on the difficulty of factoring large numbers into primes. Cryptographic keys of 2048–4096 bits are products of two huge primes. Without primes, secure internet communication would be impossible.
The calculator uses trial division up to √n. For n = 10^9 = 1,000,000,000, it checks up to ~31,623 divisors — this is very fast. For much larger numbers, probabilistic tests (Miller-Rabin) or deterministic tests (AKS) are used, but trial division is sufficient for educational purposes.
The result is for computational purposes. For numbers above 10^9, more advanced algorithms (e.g., Miller-Rabin) are required — this calculator handles numbers up to 1,000,000,000.
Calculate what percent A is of B, find X% of a number, percentage change or add a percent to a value. Fast percentage calculator online, free.
Calculate triangle area, perimeter and angles using Heron's formula. Enter three sides or two sides and an angle — free geometry calculator online.
Calculate final capital with compound interest. Enter annual rate, term and compounding frequency — free investment calculator with PLN result online.