Percentages and Math

Pascal's Triangle Generator

Generate rows of Pascal's triangle and read off the coefficients of a binomial expansion.

Your numbers

Row 0 is the single 1 at the top. Up to 60 rows.

More options

Optional. A whole number from 0 to 59.

Result

Row 9

1 9 36 84 126 126 84 36 9 1

10 rows of the triangle are listed below.

Rows built
10
Largest number in the last row
126
Coefficients for (a + b)^5
1, 5, 10, 10, 5, 1
(a + b)^5
a^5 + 5a^4b + 10a^3b^2 + 10a^2b^3 + 5ab^4 + b^5

Pascal's triangle

RowNumbersRow sum
011
11 12
21 2 14
31 3 3 18
41 4 6 4 116
51 5 10 10 5 132
61 6 15 20 15 6 164
71 7 21 35 35 21 7 1128
81 8 28 56 70 56 28 8 1256
91 9 36 84 126 126 84 36 9 1512
How this was calculated
  1. Each number is the sum of the two numbers above it, and every row starts and ends with 1. The number in row n at position k is the binomial coefficient C(n, k) = n! / (k! (n - k)!).
  2. The numbers in row n add up to 2^n, which the last column shows for every row.
  3. The same numbers are the coefficients when (a + b)^n is multiplied out.

Calculated using SumPanda.com · https://sumpanda.com/pascal-triangle-generator/

Results are estimates for general information. Verify important figures before relying on them.

Next step

How to use the pascal's triangle generator

  1. Enter how many rows of Pascal's triangle to build, from 1 to 60. Row 0 is the single 1 at the top.
  2. Open the advanced options to choose an exponent n between 0 and 59 if you also want the expansion of (a + b) to that power.
  3. Read the last row in the headline, then the full table with each row and its sum.
  4. Export the table as CSV, copy it, or print it.

Formula

C(n, k) = n! / (k! (n - k)!)

each entry = the two entries above it added together

row n adds up to 2^n

(a + b)^n = sum of C(n, k) a^(n-k) b^k

The rows are built from the product rule C(n, k+1) = C(n, k) x (n - k) / (k + 1), using exact whole numbers, so even row 59 has every digit correct.

Ten rows and (a + b)^5

Row 9 is 1, 9, 36, 84, 126, 126, 84, 36, 9, 1. Each middle number is the sum of the two above it in row 8: 36 = 8 + 28, 84 = 28 + 56 and 126 = 56 + 70. The row adds up to 512 = 2^9.

Row 5 is 1, 5, 10, 10, 5, 1, so (a + b)^5 = a^5 + 5a^4b + 10a^3b^2 + 10a^2b^3 + 5ab^4 + b^5. At 60 rows the largest number in the last row is C(59, 29) = 59,132,290,782,430,712.

Patterns hidden in the triangle

Row n lists the number of ways to choose k items out of n, so the triangle is a table of combinations. The outer diagonals are all 1s, the next diagonal counts 1, 2, 3, 4, and the one after it holds the triangular numbers. Adding the numbers along the shallow diagonals gives the Fibonacci sequence, which you can explore with the Fibonacci calculator.

Odd numbers form a pattern of triangles within triangles, the Sierpinski triangle, which appears if you color every odd entry.

Using coefficients

The numbers in row n are the coefficients when (a + b) is multiplied by itself n times. They also give the counts in a binomial distribution, where each probability multiplies a coefficient by a chance of success raised to a power. For one coefficient at a time, use the combinations and permutations calculator, and for probabilities the binomial probability calculator.

Assumptions and limits

  • The first row is row 0, so the row with n numbers in it is row n - 1.
  • The table is limited to 60 rows and the expansion to exponent 59, to keep the page quick.
  • Numbers are shown with commas in the table. Digits are exact; nothing is rounded or shown in scientific notation.
  • The expansion shows coefficients in terms of the letters a and b only, not other expressions.

Formulas reviewed October 10, 2026. See the calculation methodology for how SumPanda rounds, tests and sources its formulas.

Frequently asked questions

How do you make Pascal's triangle?

Start with a 1 at the top. Each number below is the sum of the two numbers above it, with 1s at the ends of every row. The generator builds each row directly from the combination formula, which gives the same numbers.

What is the sum of a row?

Row n adds up to 2 to the power n. Row 5 adds to 32 and row 9 to 512. The last column of the table shows the sum for every row so you can see the doubling.

How does the triangle help expand brackets?

The numbers in row n are the coefficients of (a + b) to the power n, from the highest power of a down to the highest power of b. For n = 5 they are 1, 5, 10, 10, 5, 1.

Why does the first row start at 0?

Row numbers follow the combination formula, where row n holds C(n, 0) through C(n, n). Starting at 0 means the row number is the exponent in the expansion of (a + b).