Pascal's Triangle Generator

A free tool by DeepRit, a Google Ads agency that does PPC and nothing else. We build and run Google Ads accounts so every click is accounted for. Book a free audit call

Free Pascal's triangle generator. Print up to 60 rows of Pascal's triangle with exact values, and see the binomial coefficients and row sums.

Pascal's triangle

Free, no sign-up. Runs in your browser: nothing you type is uploaded or saved.

How to use the Pascal’s triangle generator

  1. Enter the number of rows you want, from 1 to 60.
  2. Read the triangle, row by row, starting with the single 1 at the top.

The generator shows every row of Pascal’s triangle with exact values, along with the sum of the last row. Large rows contain very big numbers; the generator calculates them exactly, digit for digit, so you can use them for counting problems and checks.

What is Pascal’s triangle?

Pascal’s triangle is a triangular arrangement of numbers in which each number is the sum of the two numbers directly above it. Every row starts and ends with 1. The first rows are:

Row Numbers
0 1
1 1 1
2 1 2 1
3 1 3 3 1
4 1 4 6 4 1
5 1 5 10 10 5 1
6 1 6 15 20 15 6 1

Rows are traditionally numbered from 0, so the row "1 5 10 10 5 1" is row 5, the sixth row you see. The generator counts the rows you ask for, so entering 10 shows rows 0 to 9.

The triangle is named after the French mathematician Blaise Pascal, who wrote about it in the 17th century, but it was known much earlier. It was studied in India, Persia and China centuries before Pascal: in China it's often called Yang Hui's triangle, and in Iran the Khayyam triangle, after earlier mathematicians who described it. In Italy, it's sometimes called Tartaglia's triangle.

How the generator builds the triangle

Each row is built from the one above it:

Each inner number = the number above-left + the number above-right

Each row begins and ends with 1

For example, row 6 comes from row 5, "1 5 10 10 5 1": 1, then 1 + 5 = 6, 5 + 10 = 15, 10 + 10 = 20, 10 + 5 = 15, 5 + 1 = 6, then 1.

Binomial coefficients

The numbers in Pascal’s triangle are the binomial coefficients. The k-th number in row n (counting from 0) is:

C(n, k) = n! ÷ (k! × (n − k)!)

This is the number of ways to choose k items from n, without regard to order. For example, row 5 tells you there are 10 ways to choose 2 items from 5, since C(5, 2) = 10.

The same numbers appear when you expand a power of a sum, which is the binomial theorem:

(a + b)⁵ = a⁵ + 5a⁴b + 10a³b² + 10a²b³ + 5ab⁴ + b⁵

The coefficients, 1, 5, 10, 10, 5, 1, are row 5 of Pascal’s triangle.

Patterns in Pascal’s triangle

The triangle is full of patterns:

  • Row sums are powers of 2. The numbers in row n add up to 2ⁿ: row 5 sums to 32. The generator shows the sum of the last row; for 60 rows, the last row is row 59, which sums to 2⁵⁹ = 576,460,752,303,423,488.
  • Symmetry. Each row reads the same forwards and backwards, because choosing k items is the same as leaving out n − k.
  • Natural numbers, triangular numbers and more. The second diagonal is 1, 2, 3, 4, ...; the third is the triangular numbers 1, 3, 6, 10, 15, ...; the fourth is the tetrahedral numbers.
  • The hockey stick. Adding numbers down a diagonal gives the number just below and to the side of the last one, in a shape like a hockey stick: 1 + 3 + 6 + 10 = 20.
  • Fibonacci numbers. Adding the numbers along certain shallow diagonals gives the Fibonacci sequence: 1, 1, 2, 3, 5, 8, ...
  • Powers of 11. The first rows read as numbers give powers of 11: 1, 11, 121, 1331, 14641. After row 4, the digits carry over and the pattern needs adjusting.
  • Sierpiński's triangle. Colouring the odd numbers in a large triangle reveals the fractal pattern known as Sierpiński's triangle.

A worked example: probability with coins

What's the probability of getting exactly 3 heads in 5 fair coin tosses?

  1. Row 5 of Pascal’s triangle: 1, 5, 10, 10, 5, 1.
  2. Ways to get 3 heads: the entry for k = 3 is 10.
  3. Total outcomes: the row sum, 2⁵ = 32.
  4. Probability: 10 ÷ 32 = 0.3125, or 31.25%.

Generate 6 rows with the Pascal’s triangle generator and read row 5 to check. The same method works for any number of tosses, up to the rows available.

Exact values for large rows

Numbers grow quickly as you go down the triangle. The middle of row 59 is about 5.9 × 10¹⁶, more than ordinary floating-point arithmetic in most software can represent exactly. Such programs round very large integers, which gives wrong answers for counting problems. The Pascal’s triangle generator uses exact whole-number arithmetic, so every digit is correct, and you can copy large values into other calculations confidently.

Who uses a Pascal’s triangle generator

Students use it to learn combinations, the binomial theorem and number patterns. Teachers use it to prepare lessons and worksheets. Probability and statistics learners use it to work out binomial probabilities. Programmers use it to check combinatorics code, and puzzle enthusiasts use it to explore the triangle's many patterns.

Need more customers from Google?

This tool is free and runs in your browser. If your business also needs more leads or sales, Google Ads is where people search with their wallet out. DeepRit manages Google Ads for small and mid-size businesses, and only Google Ads. We check your account before we ever get on a call, then fix the structure, the keywords, the tracking and the ads, with month-to-month terms and no long contract. Book a free audit call.

Common mistakes

  • Counting rows from 1 instead of 0, which shifts every row by one.
  • Forgetting that rows start and end with 1.
  • Using rounded values from ordinary calculators for large rows.
  • Reading the wrong entry: entries are also counted from 0 within each row.

Counting paths on a grid

Pascal’s triangle also counts paths. Imagine a grid of streets, where you can only walk right or down. The number of different routes from the top-left corner to a point that's a steps right and b steps down is C(a + b, a), an entry in row a + b. For example, to go 3 blocks right and 2 blocks down, there are C(5, 3) = 10 routes, the same 10 that appears in row 5. You can see why by building the counts yourself: each corner can be reached from the corner above or the corner to the left, so its count is the sum of those two, exactly the rule that builds the triangle.

Lottery and card combinations

Many everyday counting questions are binomial coefficients. The number of possible hands of 5 cards from a 52-card deck is C(52, 5) = 2,598,960, an entry in row 52, which the Pascal’s triangle generator can show when you ask for 53 rows. A lottery that draws 6 numbers from 49 has C(49, 6) = 13,983,816 possible combinations, in row 49. Reading these from the triangle shows why such odds are so long: the numbers in the middle of a row grow very quickly.

The binomial distribution

In statistics, the binomial distribution gives the probability of k successes in n independent trials, each with probability p of success:

P(k) = C(n, k) × p^k × (1 − p)^(n − k)

For fair coins, p = 0.5, so every outcome has the same probability, and the chance of k heads is simply the entry in row n divided by 2ⁿ, as in the coin example above. For other probabilities, the entries from Pascal’s triangle are still the coefficients, multiplied by the probability terms. As n grows, the shape of each row, when plotted, looks more and more like a bell curve, a link between the binomial and normal distributions.

Exploring with the generator

Try generating 16 or 32 rows and looking at which numbers are odd and which are even: the odd numbers form the Sierpiński pattern. Or check the hockey stick pattern on several diagonals, and add the shallow diagonals to see the Fibonacci numbers appear. Because the Pascal’s triangle generator gives exact values, you can explore these patterns well beyond the rows that fit on a page, and confirm them for very large numbers.

Teaching ideas

Building the first ten rows by hand is a classic classroom activity. Learners can then colour multiples of 2, 3 or 5 to reveal different patterns, look for the triangular numbers, and connect the rows to expanding (a + b)ⁿ. The generator is useful for checking hand-built rows and for going further than is practical by hand.

Sources and further reading

Frequently asked questions

How is Pascal’s triangle made?

Each number is the sum of the two above it, and each row starts and ends with 1.

What are the numbers in Pascal’s triangle?

Binomial coefficients: the k-th number in row n is C(n, k), the number of ways to choose k items from n.

What do the rows add up to?

Row n adds up to 2ⁿ.

Why does row numbering start at 0?

So that row n matches the power in (a + b)ⁿ and the n in C(n, k).

How many rows can I generate?

Up to 60 rows, with exact values.

Is the Pascal’s triangle generator free?

Yes. It's free, needs no sign-up, and works in your browser.

Free PPC audit

See where your ad budget leaks.

We look at your Google Ads account before the call, then walk you through what we'd fix first, in dollars. No obligation, no hard sell.

Book a free audit call 30-minute call · Free · The audit is yours to keep