What is Pascal's Triangle?
Pascal's triangle is a table of numbers arranged in the shape of an equilateral triangle, where the k-th number in the n-th row tells you how many combinations without repetition of k elements there are from a set of n elements. It is named after French mathematician Blaise Pascal (1623–1662), though the pattern was known in Asia centuries earlier.
The top row (row 0) contains a single 1, and each subsequent row is built by adding two adjacent numbers from the row above. Edge cells are always 1.
How to Use Pascal's Triangle?
Our calculator builds the full triangle for any number of rows from 1 to 30. You simply:
- Enter the number of rows you want to generate (1–30).
- Enter the row to highlight (0-based index, so row 0 is the top row with a single 1).
- Click Calculate to see the triangle, binomial coefficients, row sum, and binomial expansion for the selected row.
Pascal's Triangle Patterns
Pascal's triangle hides dozens of patterns:
- Row sums: The sum of all numbers in row n equals 2n. For example, row 4 gives 1 + 4 + 6 + 4 + 1 = 16 = 2⁴.
- Fibonacci numbers: Summing the shallow diagonals of the triangle produces the Fibonacci sequence.
- Powers of 2: Row sums double with every row.
- Combinations (nCr): The k-th entry of row n equals C(n, k) = n! / (k! × (n−k)!).
- Symmetry: Each row is a palindrome — the numbers read the same forwards and backwards.
- Hockey stick pattern: Summing along a diagonal produces the next number on the adjacent diagonal.
- Triangular numbers: The third diagonal (1, 3, 6, 10, 15, …) consists of triangular numbers.
- Powers of 11: Row n (reading digits left to right) gives 11n for small rows (e.g., row 2 → 121 = 11²).
Example: Binomial Expansion
One of the most powerful uses of Pascal's triangle is expanding binomial expressions like (x + y)n. The coefficients of each term in the expansion are exactly the numbers in row n of the triangle.
For example, row 4 gives the coefficients for (x + y)⁴:
(x + y)⁴ = 1·x⁴ + 4·x³y + 6·x²y² + 4·xy³ + 1·y⁴
The general formula is:
(x + y)ⁿ = Σ C(n,k) · x^(n−k) · y^k, for k = 0 to n
The Binomial Coefficient Formula
Each entry in Pascal's triangle is a binomial coefficient, denoted C(n, k) or nCk:
C(n, k) = n! / (k! × (n − k)!)
where n! (n factorial) = n × (n−1) × … × 2 × 1.
Example: C(5, 2) = 5! / (2! × 3!) = (5 × 4 × 3 × 2 × 1) / ((2 × 1) × (3 × 2 × 1)) = 120 / 12 = 10.
FAQs
How many rows can this calculator generate?
Up to 30 rows. The visual triangle displays the first 20 rows for readability; rows beyond 20 are still calculated and the selected row is always fully shown.
What does "row 0" mean?
By mathematical convention, the top of the triangle (containing only the number 1) is row 0. Row 1 contains two 1s, row 2 contains 1, 2, 1, and so on. When you enter n rows, the last row has index n − 1.
Does Pascal's triangle work with measurements or currencies?
Pascal's triangle produces pure, dimensionless counting numbers (combinations). Its coefficients apply universally to any binomial expansion regardless of units — whether you're working with meters, inches, dollars ($), rubles (₽), euros (€), or any other currency or unit.
What is the largest number in Pascal's triangle for 30 rows?
The largest number in row 29 (the 30th row) is C(29, 14) = C(29, 15) = 77,558,760.
What is the "highlight row" feature?
The highlighted row is displayed prominently in the triangle and used for the binomial expansion and coefficient table. Enter a row index from 0 (first row) to n − 1 (last row). By default it is set to the last row of your triangle.