What this calculator does
Colour every line between six people according to whether they are friends or strangers. You are guaranteed three mutual friends or three mutual strangers, and with only five people you are not. That makes six the Ramsey number R(3,3), and it is the one case most people have met.
The pattern does not continue in any manageable way. R(4,4) is 18. R(5,5) is not known, and has not been for seventy years despite enormous effort, with the answer pinned somewhere between 43 and 46. Erdős's remark about this is famous: if aliens demanded R(5,5) we should marshal the planet's computers, and if they demanded R(6,6) we should attack them instead.
The formula
The Erdős-Szekeres bound of 1935 gives R(s,t) ≤ C(s+t−2, s−1), which is the only general upper bound simple enough to compute directly. It is exact at R(3,3) and loose everywhere else. The diagonal lower bound comes from Erdős's 1947 probabilistic argument: colour at random and show the expected number of monochromatic cliques is below one, which gives roughly 2^(k/2) and is asymptotic rather than useful at small k. The brute-force column shows why neither bound has been closed: checking a graph of N vertices means examining 2 to the power of the number of edges.
| Term | Meaning |
|---|---|
| R(s,t) | The smallest N such that any two-colouring of the complete graph on N vertices contains an s-clique in the first colour or a t-clique in the second. |
| Erdős-Szekeres bound | The binomial upper bound. Tight only at R(3,3). |
| Probabilistic lower bound | From the first use of the probabilistic method. Asymptotic, and weak at small sizes. |
| Brute force | 2 to the power C(N,2), the number of two-colourings of the complete graph. |
The inputs explained
| Field | What to enter |
|---|---|
| s | The clique size to look for in the first colour. Capped at 30 so the binomial stays finite. |
| t | The clique size in the second colour. Equal values give the diagonal case, which is the one that is studied most. |
When to use it
Seeing how loose the bound is
At R(3,3) the Erdős-Szekeres bound gives exactly 6, which is right. At R(4,4) it gives 20 against the true 18, and at R(5,5) it gives 70 against an answer known to be at most 46. The bound degrades quickly, and no general bound does much better.
Understanding why computers do not settle it
The brute-force column is the answer. Searching the colourings of a 43-vertex graph means about 10 to the power 272 cases, which is not a question of waiting for faster hardware.
Comparing the two bounds
The gap figure shows the upper bound divided by the lower. It widens steadily, and closing it even slightly is hard enough that the first exponential improvement to the upper bound came only in 2023.
Worked examples
Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.
How loose is the Erdos-Szekeres bound?
One colour is held at 3, which is the family that has been computed furthest.
| t | Erdos-Szekeres upper bound | Edges in the complete graph at that size |
|---|---|---|
| 3 | 6 | 15 |
| 4 | 10 | 45 |
| 5 | 15 | 105 |
| 6 | 21 | 210 |
| 7 | 28 | 378 |
| 8 | 36 | 630 |
| 9 | 45 | 990 |
Why is the diagonal case hopeless to search?
The brute-force column counts two-colourings of the complete graph at the bound.
| t | Erdos-Szekeres upper bound | Two-colourings to check by brute force |
|---|---|---|
| 5 | 70 | about 10^727 |
| 6 | 126 | about 10^2,371 |
| 7 | 210 | about 10^6,606 |
| 8 | 330 | about 10^16,341 |
| 9 | 495 | about 10^36,805 |
Questions
Why is R(5,5) still unknown?
Because the search space is astronomically large and the known bounds do not meet. The value is pinned between 43 and 46, and closing those four cases has resisted decades of work with substantial computing effort behind it.
Has anything moved recently?
Yes. In 2023 Campos, Griffiths, Morris and Sahasrabudhe gave the first exponential improvement to the diagonal upper bound since 1935. In August 2026 OpenAI reported that its Astra model had made progress on multicolour Ramsey numbers among ten open problems, with machine-checked Lean proofs.
What does the probabilistic lower bound actually say?
That a random colouring usually has no large monochromatic clique, so one must exist without. It was the founding use of the probabilistic method and it is asymptotically strong, but at small k the numbers it gives are far below the truth.
Is the Erdős-Szekeres bound ever tight?
At R(3,3) it gives exactly 6. Beyond that it is always loose, and it gets looser as the clique sizes grow.
What are multicolour Ramsey numbers?
The same question with more than two colours. R(3,3,3) is 17, and almost nothing else is known exactly, which is why progress on that family is worth reporting.
For the binomial coefficient the bound is built from, see permutations and combinations and binomial expansion. The ten problems Astra reported on are covered in the piece on Astra.