Pascal's Triangle Generator
Exact Pascal's triangle rows, C(n, k) lookup and Sierpiński pattern.
About this tool
Choose how many rows to show, and optionally highlight the odd numbers. Copy the triangle as text, or look up any single binomial coefficient C(n, k) for rows up to 1,000.
Patterns in Pascal's triangle
Each number in Pascal's triangle is the sum of the two above it, starting from a single 1. Row n (counting from 0) holds the binomial coefficients C(n, k) = n! ÷ (k!(n − k)!), the number of ways to choose k things from n, so C(10, 3) = 120. They are also the coefficients of (a + b)ⁿ: row 4 is 1 4 6 4 1. Every row sums to 2ⁿ. The diagonals contain the counting numbers, the triangular numbers (1, 3, 6, 10…) and the tetrahedral numbers, while the 'shallow' diagonals add up to the Fibonacci numbers. Colour the odd entries and a fractal appears: the Sierpiński triangle, which becomes clear with 32 or 64 rows. The middle of row 100, C(100, 50), is a 30-digit number, and all values here are exact, using arbitrary-precision integers. The triangle is named after Blaise Pascal, who studied it in 1654, but it was known centuries earlier in China (as Yang Hui's triangle), India and Persia. The permutation and combination calculator and the factorial calculator are related.
Frequently asked questions
How is Pascal's triangle made?
Start with 1; each number below is the sum of the two numbers directly above it.
What is C(n, k) in Pascal's triangle?
The kth entry (from 0) of row n, equal to n! ÷ (k!(n − k)!).
What does each row add up to?
Row n sums to 2ⁿ.
How does the Sierpiński triangle appear?
Highlighting the odd numbers produces the Sierpiński fractal pattern.
Is my data sent anywhere?
No. Everything is calculated in your browser, and nothing is stored or sent.