Cousin Prime Calculator
Primes
- A sieve of Eratosthenes marks every prime up to 1,000.
- A cousin prime pair is two primes with a gap of 4 — both prime, with exactly three integers between them, like 7 and 11.
- Scanning the sieve for p where p and p + 4 are both prime finds 41 pairs at or below the limit.
- The largest is (967, 971); for comparison the same sieve counts 35 twin pairs with a gap of 2.
Cousin primes are prime pairs that differ by 4, such as 7 and 11. The first pair is (3, 7). This calculator finds the cousin prime pairs up to a limit you choose, so you can see how many exist and which primes they are. The counts grow steadily with the limit: there are 8 cousin prime pairs with both members at or below 100, 41 at or below 1,000, and 203 at or below 10,000. At the 1,000 limit, the largest pair is (967, 971). For comparison, a sieve counts 35 twin prime pairs (gap 2) at the same limit of 1,000, so cousin pairs are slightly more common in this range.
The method behind the calculator is a prime sieve, the accepted standard for this kind of counting because it marks every composite number in the range directly, leaving only primes to be paired and checked for a gap of 4. That makes the result exact rather than estimated. On this page you will find the formula, the step-by-step workings, worked examples and the sources used, so you can follow the calculation from start to finish and check the numbers yourself.
Worked examples
cousin pairs up to 100
(100)
| cousin prime pairs up to 100 | 8 |
| largest pair in range | (79, 83) |
| first pair | (3, 7) |
| twin prime pairs (gap of 2) up to the same limit | 8 |
cousin pairs up to 1,000
(1000)
| cousin prime pairs up to 1,000 | 41 |
| largest pair in range | (967, 971) |
| first pair | (3, 7) |
| twin prime pairs (gap of 2) up to the same limit | 35 |
cousin pairs up to 10,000
(10000)
| cousin prime pairs up to 10,000 | 203 |
| largest pair in range | (9,883, 9,887) |
| first pair | (3, 7) |
| twin prime pairs (gap of 2) up to the same limit | 205 |
What are cousin primes?
Cousin primes are pairs of prime numbers that differ by exactly 4. The classic example is 7 and 11: both are prime, and 11 − 7 = 4. The first cousin prime pair is (3, 7), since 3 and 7 are both prime and the gap between them is 4. This simple definition places cousin primes in a family of prime pairs organized by how far apart the two primes sit.
That family is usually described by the gap between the primes. Twin primes have a gap of 2, cousin primes have a gap of 4, and sexy primes have a gap of 6. The names are just labels for these gap sizes, not claims about how the primes behave. So twin primes, cousin primes and sexy primes are three neighboring categories in the same way of sorting prime pairs by distance.
Here are all 8 cousin prime pairs with both members at or below 100: (3, 7), (7, 11), (13, 17), (19, 23), (37, 41), (43, 47), (67, 71) and (79, 83). That count of 8 is a useful reference point when you are checking a list of cousin primes by hand. Every pair in the list follows the same rule: both numbers are prime, and the second is exactly 4 more than the first.
The count grows as the limit grows. There are 41 cousin prime pairs at or below 1,000, and the largest of those is (967, 971). At or below 10,000, there are 203 cousin prime pairs. Comparing families at the same limit of 1,000, a sieve counts 35 twin prime pairs, so cousin pairs are slightly more common at this range. That comparison is specific to the limit of 1,000 and should not be read as a general rule about which family is larger everywhere.
- Twin primes: gap of 2
- Cousin primes: gap of 4
- Sexy primes: gap of 6
- Cousin pairs up to 100: 8
- Cousin pairs up to 1,000: 41, largest (967, 971)
- Cousin pairs up to 10,000: 203
- Twin pairs up to 1,000: 35
How the count is computed
The count on this page comes from a straightforward two-step procedure: build a list of primes, then scan that list for pairs four apart. Nothing about it depends on guesswork or on a precomputed table, so the same method works at any limit the calculator accepts.
The first step is the sieve of Eratosthenes up to the chosen limit. Start with every whole number from 2 to the limit marked as potentially prime. Take the first unmarked number, 2, keep it, and cross out every multiple of it. Move to the next unmarked number, 3, keep it, and cross out its multiples. Repeat with each next surviving number. Once you pass the square root of the limit, every number still standing is prime, because any composite below the limit must have a factor no larger than that square root. The result is a complete, exact list of primes up to the limit.
The second step is the scan. For each prime p in that list, check whether p + 4 is also in the list and does not exceed the limit. If both conditions hold, the pair (p, p + 4) is recorded as a cousin prime pair. Because the sieve has already settled primality for every number up to the limit, this check is just a lookup, and every pair with both members at or below the limit is found exactly once. The same scan produces the familiar totals: 8 cousin prime pairs with both members at or below 100, 41 cousin primes at or below 1,000, and 203 cousin prime pairs at or below 10,000. At the 1,000 limit the largest pair is (967, 971).
The method is the same one used to count other prime gaps, which makes comparisons easy. At the same limit of 1,000, a sieve counts 35 twin prime pairs, whose members differ by 2, so cousin pairs are slightly more common at this range. The first cousin pair is (3, 7), and the pattern continues with pairs like 7 and 11. Running the sieve and scan again at a new limit gives a fresh count rather than an estimate.
Cousin prime pairs table
The table below lists every cousin prime pair with both members at or below 100. A cousin prime pair is two primes that differ by 4, such as 7 and 11. The first pair is (3, 7). There are 8 cousin prime pairs with both members at or below 100, and all 8 appear in the first column of the table.
The second column of the table carries the comparison counts. At a limit of 1,000 there are 41 cousin prime pairs, the largest being (967, 971). At a limit of 10,000 there are 203 cousin prime pairs. The twin prime counts sit alongside for reference: at the same limit of 1,000 a sieve counts 35 twin prime pairs (gap 2), so cousin pairs are slightly more common at this range. Twin primes differ by 2, so the two families are close in size but not identical, and the table keeps both numbers in view so you can compare them at each limit.
Read the table in two ways. The pair list shows you exactly which cousin primes fall at or below 100, so you can check any candidate pair against it by eye. The count rows show how the family grows as the limit rises: 8 pairs at 100, 41 at 1,000, and 203 at 10,000. Because the counts and the pair list come from the same definition, a pair either differs by 4 with both members prime or it does not, the table stays consistent from row to row.
One caution about the comparison. The twin count of 35 is given only for the limit of 1,000, so do not read the twin column as a full series across all three limits. Where a twin figure is not supplied, the cell is left blank rather than estimated. That keeps every number in the table traceable to a stated count, and it means the only direct cousin-versus-twin comparison you can make from this table is at 1,000, where cousin pairs lead 41 to 35.
Use the pair list as a quick reference and the counts as a scale check. If you are testing whether a pair belongs among the cousin primes, confirm that both numbers are prime and that the difference is exactly 4; the (3, 7) entry shows the pattern at its smallest. Then look at the count for the limit you care about to see how many pairs you should expect in total.
| Cousin prime pairs at or below 100 | Cousin prime pairs at or below 1,000 | Cousin prime pairs at or below 10,000 | Twin prime pairs at or below 1,000 |
|---|---|---|---|
| (3, 7) | 41 pairs | 203 pairs | 35 pairs |
| (7, 11) | |||
| (13, 17) | |||
| (19, 23) | |||
| (37, 41) | |||
| (43, 47) | |||
| (67, 71) | |||
| (79, 83) | |||
| 8 pairs | |||
| Largest at 1,000: (967, 971) |
Are there infinitely many cousin primes?
Nobody knows. Whether there are infinitely many cousin primes is an open problem in number theory. The data we do have shows that cousin primes keep turning up as the numbers grow: there are 8 cousin prime pairs with both members at or below 100, 41 pairs at or below 1,000 (the largest being 967 and 971), and 203 pairs at or below 10,000. That steady supply is suggestive, but suggestion is not proof, and no one has shown that the list never ends.
The leading prediction comes from the Hardy-Littlewood conjecture. It forecasts not only that infinitely many cousin primes exist, but also a precise density for them — an estimate of how many pairs you should expect below any given limit. In other words, the conjecture does not merely say the supply is endless; it says roughly how fast the pairs should thin out as you count higher. That is a much stronger and more specific claim than a simple guess that more pairs exist.
The same circle of ideas includes the first Hardy-Littlewood conjecture, which covers all prime gaps, not just the gap of 4 that defines cousin primes. Under that broader framework, cousin primes are one case among many: the conjecture predicts how often primes separated by any fixed even gap should appear. So the question of infinitely many cousin primes sits inside a larger, unified prediction about how prime gaps are distributed.
What makes the question hard is that the primes are not laid out by any simple rule, and proving that a particular pattern repeats forever is beyond current techniques. The counts at 100, 1,000 and 10,000 fit the predicted behavior, but finite evidence — however tidy — cannot settle an infinite question. For now, the honest answer is that infinitely many cousin primes are expected, strongly and precisely, but not proven.
A useful comparison comes from twin primes, which differ by 2. At the same limit of 1,000, a sieve counts 35 twin prime pairs, so cousin pairs are slightly more common at this range. That kind of side-by-side counting is exactly what the Hardy-Littlewood predictions try to explain, and it is also why the cousin primes remain an active subject of study rather than a settled fact.
FAQs
What are cousin primes?
Cousin primes are pairs of prime numbers that differ by 4. For example, 7 and 11 are both prime, and 11 minus 7 equals 4, so they form a cousin prime pair. Another example is 13 and 17. The gap between the two primes in each pair is always exactly 4.
How many cousin prime pairs are there below 100?
Below 100 there are 8 cousin prime pairs. The list starts with (3, 7) and ends with (79, 83). So if you check every prime under 100 and look for partners exactly 4 apart, you will find 8 such pairs in total.
How many cousin prime pairs are there below 1,000?
Below 1,000 there are 41 cousin prime pairs. The largest of these is (967, 971), since both 967 and 971 are prime and they differ by 4. That count of 41 covers every cousin prime pair with both members under 1,000.
What is the difference between twin and cousin primes?
Twin primes differ by 2, while cousin primes differ by 4. For instance, 11 and 13 are twin primes, but 7 and 11 are cousin primes. The counts differ too: below 1,000 there are 35 twin prime pairs and 41 cousin prime pairs, so cousin pairs are somewhat more common in that range.
Is it known whether there are infinitely many cousin primes?
No. It is not known whether infinitely many cousin prime pairs exist. The idea that there are infinitely many is a conjecture, associated with Hardy-Littlewood, but it remains unproven. This is the same situation as the twin prime conjecture, which is also still unproven.
What is the largest cousin prime pair below 100?
The largest cousin prime pair below 100 is (79, 83). Both 79 and 83 are prime, and 83 minus 79 equals 4, so they qualify as cousin primes. No pair with both primes under 100 has a larger smaller member than 79.