Omni Calculator logo

Pascal's Triangle Calculator

Created by Maciej Kowalski, PhD candidate
Reviewed by Bogna Szyk and Jack Bowater
Last updated: Jan 18, 2024

Welcome to our Pascal's triangle calculator, where you will learn how to use Pascal's triangle and why you should use it in the first place. Don't worry; this concept doesn't require area formulas or unit calculations, as with a typical triangle. What is Pascal's triangle, then? Well, it's a neat way to calculate the number of combinations and visualize binomial expansion. But before we begin describing Pascal's triangle patterns, let's start with the basics.

What is Pascal's triangle?

Pascal's triangle is a table of numbers in the shape of an equilateral triangle, where the k-th number in the n-th row tells you how many combinations without repetition of k elements there are from a set of n elements. It is named after French mathematician Blaise Pascal.

💡 If the "combination" term seems rare to you, check our combination calculator.

(Note that we follow the convention that the top row, the one with the single 1, is considered to be row zero, while the first number in a row, also a 1, is considered the 0th number of that row.) As such, the n-th row, as a whole, counts all possible subsets of an n-element set. Be they films for a movie marathon, European countries to visit this summer, or ingredients from your fridge for tomorrow's dinner, this statement of combinations always remains true (we're pretty sure that the last one is not precisely how cooking works, but some of us have to make up for a lack of skills with creativity).

Each number shown in our Pascal's triangle calculator is given by the formula that your math teacher calls the binomial coefficient (the one known as nCr in the binomial distribution calculator). The name is not too important, but let's see what the computation looks like. If we denote the number of combinations of k elements from an n-element set as C(n,k), then:

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

The exclamation mark above is what mathematicians call "factorial," defined as the product of all numbers up to and including n, i.e.,

n! = n × (n-1) × (n-2) × ... × 2 × 1.

🔎 You can use our factorial calculator to avoid all those complicated multiplications.

How to use Pascal's triangle?

Say that you're preparing a movie marathon for yourself and your partner. You have a list of your favorite twenty movies, and your partner told you to pick three they might like. Well, these are the best films in existence, so clearly they will like each and every one of them, and it doesn't really matter which ones you choose. Also, the order in which you watch them doesn't matter either. So how many options are there?

The number you seek is the third number in the twentieth row, 1140. Magic? Not quite, just mathematics (but then again, are they that different?). Indeed, according to Pascal's triangle formula, that number corresponds to the expression C(20,3), which is the number of triples from a set of twenty elements. Or, in our case, the number of ways we can choose three movies from a pile of twenty.

Pascal's triangle patterns

Blaise Pascal focused on several interesting triangular properties. Indeed the number of combinations, which is encoded as individual numbers in consecutive rows, was already known during his time. However, the triangle is often introduced using a much simpler rule. Observe that apart from the 1s on the far ends of the triangle, each of the other numbers is the sum of the two that are directly above it.

Pascal's triangle patterns shown on rows 3, 4 and 5.

This is precisely the observation (or property if you like) that is frequently used to construct the triangle. Using the Pascal's triangle formula, we can describe this observation:

C(n,k) = C(n-1,k-1) + C(n-1,k).

In particular, look at the second number from the left in each row. Each of those has one to its upper left, and to its upper right is the row number of the previous row. Therefore, their sum is one plus the previous row number (the essence of our arithmetic sequence calculator), and the result is the row we are in.

Another of the numerous interesting Pascal's triangle patterns is its symmetry. Observe that in any row, if we read the consecutive numbers from the left, we will obtain the same as if we read them from the right. Is it magic or mathematics again? Well, let's try to understand what's happening here.

By definition, the number on the k-th place in the n-th row depicts how many ways we can pick k elements from a set of n elements. But what if, instead, we pointed out the elements that we didn't choose? It may sound a bit vague, so why don't we show you an example?

Recall the scenario from the second section, where we wanted to pick three movies to watch from a list of twenty. But what if it's difficult to choose the three you want to see most? Maybe it's easier to eliminate one by one those that you don't feel like watching? Surely, if we then cross out seventeen of them, we'll be left with our choice of three. That is precisely what we described above - we instead choose seventeen that we don't want to watch. This, written using notation from Pascal's triangle formula in the first section, is:

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

which, for us, translates as the number in the k -th spot counting from the left is the same as the one on the k-th when counting from the right for any row n.

Example: binomial expansion

Mathematically speaking, the answer to "What is Pascal's triangle?" is just this: binomial expansion. Don't worry; we're not here to sound smug by using some fancy words and symbols when a simple explanation will do. For everyone's benefit, we'll show you through a real-life scenario how to answer this question, explaining how to use Pascal's triangle calculator along the way.

Say that your dog will have puppies, and you know that there will be six of them, but you don't know their sexes. If we number the puppies in the order they come into this world, we can start thinking about the probability of what sex they will be. Surely six boys are not as likely as, e.g., two boys and four girls. That is because the two boys may come as the first two pups, or the last two, or the middle two, etc., and so there are far more combinations for that to happen.

Okay, now comes the tricky part. We'll try to convince you that the pups can be described by a symbolic (x + y)⁶. To see this, associate x with "boy" and y with "girl." Now, look at the expansion:

(x + y)⁶ = (x + y) × (x + y) × ... × (x + y).

How does each summand appear after we multiply out the above expression? Well, it comes from taking one of the summands in each of the parentheses, i.e., by taking either x or y bracket after the bracket. In our translation, that means determining the sex of each of the six pups one by one. This means that every summand of the form, say, x² × y⁴, which corresponds to twice picking x from inside the brackets and picking y four times, translates to a litter of two boys and four girls.

Now let's look at the expansion after the multiplication and reorganizing the similar monomials:

(x + y)⁶ = x⁶ + 6x⁵y + 15x⁴y² + 20x³y³+ 15x²y⁴ + 6xy⁵ + y⁶.

Compare it with the sixth level of Pascal's triangle, returned by Pascal's triangle calculator:

1 6 15 20 15 6 1.

These numbers correspond to the coefficients in the expansion above. In other words, the sixth (or n-th in general) level of the triangle corresponds to the coefficients of (x + y)⁶ (respectively: to the power n) in their binomial expansion. And this, as we saw with our dog scenario, translates further to answer some real-life problems.


How do I calculate rows in Pascal's triangle?

If you want to calculate a Pascal's triangle row:

  1. Start by writing down the very top of the triangle: the zeroth row contains a single 1.

  2. Then, the first row contains two 1s.

  3. All the remaining rows follow the same principle: write down a 1 at its beginning and end. Each one of the missing numbers is the sum of the two numbers that are directly above it (in the previous row).

  4. Follow these rules until you get the row you need.

How do I find the sum of rows in the Pascal's triangle?

The sum of numbers of n-th row of Pascal's triangle is equal to 2ⁿ. Indeed, we easily verify that the subsequent sums are 1, 2, 4, 8, 16, etc. This follows from the fact that the set of n elements has 2ⁿ subsets.

What is the 7th row of Pascal's triangle?

The seventh row of Pascal's triangle is 1 7 21 35 35 21 7 1.

What is the 10th row of Pascal's triangle?

The tenth row of Pascal's triangle is 1 10 45 120 210 252 210 120 45 10 1.

Maciej Kowalski, PhD candidate
the triangle up to...
Check out 10 similar sequences calculators 🔗
Arithmetic sequenceCollatz conjectureConvolution… 7 more
People also viewed…


Addiction calculator tells you how much shorter your life would be if you were addicted to alcohol, cigarettes, cocaine, methamphetamine, methadone, or heroin.

Double angle

This double angle calculator will help you understand the trig identities for double angles by showing a step by step solutions to sine, cosine and tangent double angle problems.

Fundamental counting principle

The fundamental counting principle calculator will help you find out how many options you have for choosing up to ten characteristics of whatever it is you're dealing with.

Meat footprint

Check out the impact meat has on the environment and your health.