Skip to content
MasterMath

Pascal's Triangle Calculator

Build Pascal's triangle to any depth. Each row gives the binomial coefficients, and each one adds to a power of two.

Last row

—

Last row—
Rows generated—
Largest number in that row—
That row adds to—

The triangle

RowValuesSum

How this was worked out

    The rule

    each entry is the sum of the two above it

    Why it works

    Pascal's triangle starts with a single 1. Every row begins and ends with 1, and every other entry is the sum of the two directly above. Row n gives the coefficients of (a + b)ⁿ.

    How to do it by hand

    1. Write a single 1 for the first row
    2. Start and end each new row with 1
    3. Every other entry is the sum of the two above it
    4. Row n contains the combinations of n items

    What is worth knowing

    The triangle is a filing cabinet of patterns. Each row adds to a power of two, because choosing any subset of n items gives 2ⁿ possibilities. The diagonals hold the counting numbers, then the triangular numbers, then the tetrahedral ones. Shading the odd entries produces the Sierpiński triangle, a fractal that nobody put there. And the whole thing predates Pascal by centuries: it appears in Chinese, Indian and Persian texts, which is why it is also called Yang Hui's triangle or Khayyam's triangle depending on where you are.

    Frequently asked questions

    What are the numbers in Pascal's triangle?

    The binomial coefficients. Row n gives the coefficients of (a + b)ⁿ and the combinations of n items.

    Why does each row add to a power of two?

    Because the row counts every possible subset of n items, and there are 2ⁿ of those.

    What patterns are hidden in it?

    The diagonals give counting, triangular and tetrahedral numbers, and shading the odd entries draws the Sierpiński fractal.

    Did Pascal invent it?

    No. It appears in Chinese, Indian and Persian mathematics centuries earlier, which is why it has several other names.