Pascal's Triangle Calculator

PASCAL'S TRIANGLE
Type how many rows you want and press Build it.
How it is built, the patterns, and the check
Your number of rows
A whole number of rows, from 1 to 80. The top row is numbered 0, so ten rows means rows 0 to 9 — ask for 11 if you want to see row 10 itself. Holding deletes one digit after another.
Every entry is the sum of the two directly above it, and this page builds them that way — by addition, with no factorials anywhere.
Tap a box, then use the keys
Rows are numbered from 0, and so are the positions along each row. The number sitting in row n at position k is the number of ways of choosing k things from n, which is why the same figures turn up in counting problems and in expanding brackets.
How the triangle is built

This Pascal's Triangle calculator builds the triangle to as many rows as you ask for, labels every row, and works out the patterns buried in it.

Ask this Pascal's triangle calculator for ten rows and you get rows 0 to 9. Row 9 is 1, 9, 36, 84, 126, 126, 84, 36, 9, 1, and it adds up to 512.

Pascal's Rule Is the Whole Thing

Start with one number: 1. Every row after that begins and ends with a 1, and each gap in the middle is filled by adding the two numbers directly above it.

Pascal's triangle needs nothing else. No factorials, no formula, nothing to memorise. Row 4 is 1, 4, 6, 4, 1 because 1 + 3 = 4, 3 + 3 = 6, and 3 + 1 = 4. A child can extend the triangle for as long as there is paper.

Which makes it odd that several Pascal's triangle calculators build it from n! ÷ (k!(n − k)!) instead. That formula is correct, but it is the slow road, and in ordinary decimal arithmetic it breaks — more on that below.

Pascal's Triangle Starts at Row 0, Not Row 1

Nothing about Pascal's triangle confuses people more than this, and it is not a mathematical difficulty at all.

Row 0 is the top one. Positions along a row are counted from 0 too. So "ten rows of Pascal's triangle" means rows 0 through 9, and if a question asks for row 10 you need eleven rows to see it. Every row on this page is numbered down the left, which removes the guesswork entirely.

Row 10, for the record, is 1, 10, 45, 120, 210, 252, 210, 120, 45, 10, 1.

Every Number in Pascal's Triangle Is a Count

Sitting in row n at position k is the number of ways of choosing k things out of n — the same figure the combination calculator gives for nCr, and the same one built from factorials in the closed formula.

That 10 in row 5 says there are ten ways to pick two items from five. It is also the coefficient of the middle term when a bracket is raised to the fifth power, which is why row n of the triangle hands you every coefficient of a binomial expansion at a glance. One arrangement of numbers, three subjects.

Where a Decimal Generator Starts Lying

Here is a specific thing to test any Pascal's triangle generator with, this one included.

Go to row 57 and look at position 25. Its true value is 9,929,472,283,517,787. A tool computing in ordinary decimals reports 9,929,472,283,517,788 — out by one, silently, with no warning that anything has happened.

Row 57 is where that starts, and it never recovers afterwards. This page holds whole numbers all the way through and builds by addition, so row 79 comes back with its 23-digit entries intact.

Look atYou findStarting
any row, added up a power of two 1, 2, 4, 8
the second diagonal the counting numbers 1, 2, 3, 4
the third diagonal the triangular numbers 1, 3, 6, 10
the shallow diagonals the Fibonacci numbers 1, 1, 2, 3, 5

Patterns Worth Knowing

Row sums are the useful pattern. Every number feeds into exactly two below it, so each row totals twice the one before, and row n adds to 2ⁿ. If a row of a hand-drawn triangle does not hit the next power of two, there is a mistake in it, and you have found it without checking a single entry.

Fibonacci is the surprising one. Add along the shallow diagonals instead of the rows and out come 1, 1, 2, 3, 5, 8, 13. Nobody put them there. They fall out of the same addition rule.

Then the hockey stick: 1 + 2 + 3 + 4 + 5 = 15, and the 15 sits one row down and one place across from where the run stopped. The page computes all three from the triangle it just built, rather than quoting them at you.

How to Use This Pascal's Triangle Calculator

Type how many rows of Pascal's triangle you want, then press Build it. Rows are labelled, so nothing is ambiguous, and the triangle scrolls sideways rather than being cut off once the rows outgrow the screen.

Underneath you get the last row on its own, its total, and how many numbers are on screen. Show the working opens the addition that produced a row, the row sums, what the numbers count, and the three patterns above.

Before any of it appears, every entry is recomputed by the choosing formula — a completely different method from the addition that built it — and the two must agree. On top of that the page checks that each row reads the same backwards, that the edges are all 1, that each row sums to its power of two, and that the hockey stick lands where it should. The number of checks that passed is printed with the working.

Pascal's Triangle Calculator FAQ

How do you build Pascal's triangle?
Start with a single 1. Put a 1 at each end of every row after that, and fill the middle by adding the two numbers directly above each gap. Nothing else is needed and no formula is involved.
Is the top row row 0 or row 1?
Row 0. Positions along a row are numbered from 0 as well, so the first number in any row is number 0. Ten rows therefore means rows 0 to 9, and seeing row 10 itself takes eleven rows.
What is the 10th row of Pascal's triangle?
1, 10, 45, 120, 210, 252, 210, 120, 45, 10, 1. It has eleven entries, it adds up to 1024, and it gives the coefficients when a bracket is raised to the tenth power.
Why does each row add up to a power of two?
Every number feeds into exactly two numbers in the row below, so each row totals twice the one before. Row n adds to 2 to the power n. It is the fastest check on a hand-drawn triangle.
What does a number in Pascal's triangle mean?
The number in row n at position k is the count of ways to choose k things from n. The 10 in row 5 says there are ten ways to pick two items from five, and it is the same 10 that appears when a bracket is raised to the fifth power.
Where are the Fibonacci numbers in Pascal's triangle?
Add along the shallow diagonals rather than the rows and you get 1, 1, 2, 3, 5, 8, 13 and onwards. They are not put there deliberately; they fall out of the same addition rule that builds everything else.
What is the hockey stick pattern?
Take a run of numbers down one diagonal and add them: 1 + 2 + 3 + 4 + 5 = 15, and 15 sits one row below and one place across from where the run stopped. The shape the numbers make is where the name comes from.
How many rows can this calculator build?
Eighty. Row 79 already contains a 23-digit number, and every entry is exact, which matters from row 57 onwards where ordinary decimal arithmetic stops being able to hold the values.

Add the two above, put a 1 at each end, and count the rows from zero.