Pascal's triangle generator

Enter how many rows you want. Each row is listed with exact whole numbers, the last row's sum and its largest entry are shown, and you can copy the whole triangle.

A whole number from 1 to 60. Row n = 0 is the top.
n = 0
1
n = 1
1 1
n = 2
1 2 1
n = 3
1 3 3 1
n = 4
1 4 6 4 1
n = 5
1 5 10 10 5 1
n = 6
1 6 15 20 15 6 1
n = 7
1 7 21 35 35 21 7 1
Sum of the last row
128
Largest entry in the last row
35
Copy all rows
8

Runs in your browser: nothing you enter is sent anywhere.

How to use it

  1. Enter the number of rows.
  2. Read the rows from the top: the row labelled n = 0 is the single 1.
  3. Use the copy button to take the whole triangle as text, one row per line.

How it works

Each entry equals the sum of the two entries above it, with missing neighbours counted as 0. The calculator uses exact big integers, so no digit is rounded.

Worked example

Six rows give n = 0 to n = 5:

  • 1
  • 1 1
  • 1 2 1
  • 1 3 3 1
  • 1 4 6 4 1
  • 1 5 10 10 5 1

The last row sums to 2⁵ = 32 and its largest entry is 10.

Tips

  • Row n expands (a + b)ⁿ: row 3 gives a³ + 3a²b + 3ab² + b³.
  • The shallow diagonals add up to the Fibonacci numbers.

Frequently asked questions

What is Pascal's triangle?

A triangle of numbers where each entry is the sum of the two above it, and the edges are 1. Row n holds the binomial coefficients C(n, 0) to C(n, n).

How do I read a binomial coefficient from it?

Row n, position k (both counting from 0) is C(n, k). In the row 1 4 6 4 1, which is row 4, C(4, 2) = 6.

What is the sum of a row?

Row n adds up to 2 to the power n. Row 5, 1 5 10 10 5 1, sums to 32.

Why stop at 60 rows?

It keeps the page fast and readable. The numbers are exact whole numbers with no rounding even past the size ordinary calculators can hold.

More in Math

All tools in this category: Math ·Updated November 3, 2026

Privacy choices

Google Analytics shows us which tools are used and whether they work. It may set cookies. Your choice is kept in this browser.