Catalan Number Calculator
Catalan numbers are one of the most frequently appearing sequences in combinatorics. The nth Catalan number is C(n) = (2n)! divided by ((n+1)! times n!). The sequence starts 1, 1, 2, 5, 14, 42, 132, 429, 1430 and grows roughly as 4^n. Enter any n from 0 to 20 and this calculator shows C(n), a table of all Catalan numbers from C(0) to C(n), and concrete counting examples. Catalan numbers count many types of combinatorial objects: C(n) valid sequences of n pairs of matching parentheses, C(n) ways to fully parenthesise a product of n+1 factors, C(n) ways to triangulate a convex polygon with n+2 vertices, C(n) full binary trees with n+1 leaves, and C(n) monotone lattice paths from (0,0) to (n,n) that stay on or below the diagonal. They appear throughout algorithm analysis, data structure theory, and formal language theory. C(20) = 6,564,120,420, approaching the limits of integer precision.
Catalan numbers table (C(0) to C(n))
| n | C(n) | Valid bracket sequences | Binary trees with n+1 leaves |
|---|
Catalan number formula
C(n) = (2n)! / ((n+1)! * n!)
Alternatively: C(n) = binomial(2n, n) / (n + 1)
Recurrence: C(0) = 1, C(n+1) = sum of C(i)*C(n-i) for i=0..n
Asymptotic: C(n) ~ 4^n / (n^(3/2) * sqrt(pi))
Catalan numbers: frequently asked questions
What are Catalan numbers?
Catalan numbers are a sequence of natural numbers with many applications in combinatorics. C(n) = (2n)! / ((n+1)! * n!). The first few are C(0)=1, C(1)=1, C(2)=2, C(3)=5, C(4)=14, C(5)=42. They were studied by Eugène Catalan in the 19th century, though earlier work by Chinese mathematician Mingantu predates Catalan.
What do Catalan numbers count?
Catalan numbers count many combinatorial structures. C(n) equals: the number of valid sequences of n pairs of matching parentheses; the number of full binary trees with n+1 leaves; the number of ways to triangulate a convex polygon with n+2 sides; the number of monotonic paths from (0,0) to (n,n) that never cross above the main diagonal.
Is there a recursive formula for Catalan numbers?
Yes. C(0) = 1 and C(n+1) = sum of C(i) * C(n-i) for i from 0 to n. This reflects the combinatorial interpretation: a balanced parenthesisation of length 2(n+1) splits at its first matching close-paren, giving two sub-sequences whose lengths multiply by the Catalan recurrence.
How fast do Catalan numbers grow?
Catalan numbers grow approximately as 4^n / (n^(3/2) * sqrt(pi)). C(10) = 16,796, C(15) = 9,694,845, and C(20) = 6,564,120,420. The exact formula C(n) = (2n)! / ((n+1)! * n!) always gives an integer, though for large n both the numerator and denominator are enormous.
Why are Catalan numbers named after Catalan?
Eugène Catalan (1814-1894) was a Belgian mathematician who studied these numbers in the context of parenthesisation problems. However, the sequence was independently discovered earlier by Chinese mathematician Mingantu around 1730, and it also appears in Euler's work on polygon triangulations from 1751.
Sources
- Catalan numbers in combinatorics: OEIS A000108 (Catalan numbers).
- Stanley, R.P., Catalan Numbers (Cambridge University Press, 2015): Cambridge University Press.
Reviewed by the CalculatorHub team, edited by James Graham, 14 June 2026. See our methodology.