Skip to content
Math

Pascal's Triangle Calculator

Generate any number of rows of Pascal's triangle, find the exact value of a single entry C(n,k), or discover why every row sum is a power of two. Enter a row count to display the full triangle, or switch to entry mode to look up any cell using its row and column numbers. All working is shown step by step.

Your details

Triangle mode shows the full triangle layout. Entry mode finds one specific cell. Row-sum mode gives the total of all numbers in a row.
How many rows to generate, counting from row 0. Max 20 rows.
rows
Row index, starting from 0. Row 0 is just "1".
C(n, k)Medium coefficient
20

The binomial coefficient at row n, column k

Row sum64
Row maximum20
Triangle rowsRow 0: 1 Row 1: 1 1 Row 2: 1 2 1 Row 3: 1 3 3 1 Row 4: 1 4 6 4 1 Row 5: 1 5 10 10 5 1 Row 6: 1 6 15 20 15 6 1
C(n, k)20
Row sum64
Row max20

First 7 rows of Pascal's triangle

  • The triangle has 7 rows (row 0 through row 6).
  • Row 6 sums to 2^6 = 64.
  • Every interior entry equals the sum of the two entries directly above it in the previous row.
  • Rows are symmetric: C(n, k) = C(n, n-k) for every position.

Next stepSwitch to Entry mode to look up any individual binomial coefficient C(n, k).

Pascal's Triangle Row Table

Row nEntriesRow Sum (2^n)Center Entry
0111
11, 121
21, 2, 142
31, 3, 3, 183
41, 4, 6, 4, 1166
51, 5, 10, 10, 5, 13210
61, 6, 15, 20, 15, 6, 16420

Each entry C(n,k) equals the number of ways to choose k items from n. Row sums double with each row.

What is Pascal's Triangle?

Pascal's triangle is a triangular array of numbers where every entry equals the sum of the two entries directly above it. The outermost entries in every row are always 1, and each interior entry is computed by adding the two numbers on either side of it in the row above. Row 0 contains just a single 1, row 1 contains 1 1, row 2 contains 1 2 1, and so on. Blaise Pascal popularised the arrangement in 1653, though mathematicians in China, Persia and India had studied it centuries earlier. Today it appears throughout combinatorics, probability theory, algebra and number theory.

How to read row and column numbers

Rows and columns are both numbered from 0. Row 0 is the apex containing a single 1. Within any row n, column k runs from 0 on the left to n on the right. The entry at row n and column k is the binomial coefficient C(n, k), read as "n choose k" and calculated as n! divided by the product of k! and (n-k)!. For example, C(5, 2) = 5! / (2! x 3!) = 120 / 12 = 10, matching the third entry of row 5. The calculator automatically applies this formula for any n and k you enter.

Notable patterns in Pascal's Triangle

The triangle is symmetric around its vertical axis: C(n, k) = C(n, n-k). Every row sums to a power of 2 (row n sums to 2^n) because the binomial theorem gives (1+1)^n = the sum of all C(n,k). The second entry of every row equals the row number itself. Diagonals encode important sequences: the outer diagonal is all 1s, the next diagonal is the natural numbers, the one after gives the triangular numbers (1, 3, 6, 10, ...), and then the tetrahedral numbers. The hockey stick identity says that the sum of a diagonal segment C(r, k) + C(r+1, k) + ... + C(n, k) always equals C(n+1, k+1). Odd entries in the triangle trace out the Sierpinski triangle fractal when highlighted.

Applications in probability and algebra

Binomial coefficients are the coefficients that appear when you expand a power of a two-term expression. (x + y)^n = C(n,0)x^n + C(n,1)x^(n-1)y + ... + C(n,n)y^n, where the entries in row n of Pascal's triangle fill in the coefficients in order. In probability, C(n, k) gives the number of ways exactly k successes can occur in n independent trials when the probability of each outcome is the same - the foundation of the binomial distribution. In combinatorics, it counts the number of ways to choose k items from a collection of n distinct items without regard to order.

Key Patterns in Pascal's Triangle

PatternFormulaExample (row 5)
Row sum2^n2^5 = 32
First entryC(n,0) = 1C(5,0) = 1
Last entryC(n,n) = 1C(5,5) = 1
Second entryC(n,1) = nC(5,1) = 5
Center (even n)C(n, n/2)C(6,3) = 20
SymmetryC(n,k)=C(n,n-k)C(5,2)=C(5,3)=10
Hockey stickSum C(r,k)=C(n+1,k+1)1+3+6=10

Properties that hold for every row of Pascal's triangle.

Frequently asked questions

How do I find a specific number in Pascal's Triangle?

Use the binomial coefficient formula: C(n, k) = n! / (k! x (n - k)!), where n is the row number (starting from 0) and k is the position within that row (also starting from 0). For example, the entry in row 6, column 2 is C(6, 2) = 720 / (2 x 24) = 15. You can also use this calculator's Entry mode by entering n and k directly.

Why does every row of Pascal's Triangle sum to a power of 2?

The binomial theorem states that (x + y)^n equals the sum of C(n, k) x^(n-k) y^k for k from 0 to n. Setting both x and y to 1 gives 2^n = the sum of all C(n, k) in row n. So the row sums are 1, 2, 4, 8, 16, 32, ... for rows 0, 1, 2, 3, 4, 5, ...

What are the diagonal patterns in Pascal's Triangle?

The diagonals (reading down-left or down-right from any edge entry) encode well-known number sequences. The first diagonal is all 1s. The second diagonal gives the natural numbers: 1, 2, 3, 4, ... The third gives the triangular numbers: 1, 3, 6, 10, 15, ... The fourth gives the tetrahedral numbers: 1, 4, 10, 20, 35, ... Each diagonal is the cumulative sum of the one before it.

What is the hockey stick pattern?

The hockey stick identity says that if you pick any diagonal and sum a consecutive group of entries starting from an edge 1 - say C(2,2) + C(3,2) + C(4,2) + C(5,2) = 1 + 3 + 6 + 10 = 20 - the result equals C(6, 3) = 20, the entry one row below and one column across from the last term. The shape traced resembles a hockey stick, with the diagonal as the handle and the answer at the blade.

How is Pascal's Triangle related to the Fibonacci sequence?

Summing the entries along the shallow diagonals (going up-right) of Pascal's triangle reproduces the Fibonacci sequence: 1, 1, 2, 3, 5, 8, 13, 21, ... The first diagonal gives 1, the second gives 1, the third gives 1+1 = 2, the fourth gives 1+2 = 3, and so on. Each shallow diagonal sum equals the Fibonacci number for that position.

How do I use Pascal's Triangle for binomial expansion?

To expand (x + y)^n, take row n of Pascal's triangle and use its entries as coefficients in order from left to right. For (x + y)^4, row 4 is 1 4 6 4 1, giving x^4 + 4x^3y + 6x^2y^2 + 4xy^3 + y^4. Each term's exponents sum to n, and the coefficients are the binomial coefficients C(n, k).

Sources

Written by Dr. Rajiv Menon, PhD Applied Mathematician · Bengaluru, India

Applied mathematician bridging algebraic theory and computational tools for students, engineers, and everyday problem-solvers.

Search 3,500+ calculators

Loading search…