All Tools

Pascal's Triangle Calculator, Rows 0 to 60, C(n,k)

Build Pascal's triangle up to 60 rows with exact numbers, hover any cell to see C(n,k), copy it as text or CSV, and compute a binomial coefficient for n up to 1000.

Pascal's triangle

Hover, focus or tap a number to see its C(n,k) value.

Binomial coefficient C(n,k)

Enter n and k to see how many ways there are to choose k items from n.


About the Pascal's Triangle Calculator

The Pascal's Triangle Calculator draws the triangle for as many rows as you like, up to 60, and shows every entry exactly. Row 0 is a single 1. Every row below it starts and ends with 1, and each inner number is the sum of the two numbers directly above it. The result is one of the most studied number patterns in mathematics: it holds the coefficients of binomial expansions, the counts of combinations, the powers of two and the Fibonacci numbers.

Move the Rows slider to grow the triangle from 0 to 30 rows, or type a number of rows from 0 to 60 in the number field. Hover over, tap or tab to any number and the line above the triangle reads out its position as C(n,k), the entry in row n at position k, for example C(7,3) = 35. Rows are counted from 0 and positions are counted from 0, so the triangle's top is row 0.

Every entry is computed with exact integer arithmetic, not floating point, so the large numbers deep in the triangle are correct to the last digit. The middle entry of row 60 is 118264581564861424, a number that would lose its final digits in an ordinary calculator.

How to use the calculator

Steps

  1. Set the size of the triangle with the Rows slider, or type a value into Number of rows (0 to 60). Typing a value above 30 keeps the slider at its maximum but still draws the full triangle.
  2. Hover, tap or tab to a number to see its C(n,k) value in the readout line.
  3. Press Copy as text to copy the rows as space-separated numbers, or Copy as CSV to copy comma-separated rows for a spreadsheet.
  4. Use the second panel to compute a single coefficient C(n,k) for n up to 1000, with the formula and the digit count shown.

How each number is built

Each entry is the sum of the two entries above it. This is the addition rule, and it gives the formula for any entry directly:

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

The closed form uses factorials:

C(n,k)=n!k! (n−k)!C(n,k) = \frac{n!}{k!\,(n-k)!}

Worked examples

Example 1: row 6

Row 5 is 1, 5, 10, 10, 5, 1. Adding neighbours gives row 6: 1, 6, 15, 20, 15, 6, 1. The entry 15 is 5 + 10, and the entry 20 is 10 + 10. In coefficient form, C(6,2) = 15 and C(6,3) = 20.

Example 2: expanding a power

The numbers in row 4, which are 1, 4, 6, 4, 1, are the coefficients of (a + b) to the fourth power: a^4 + 4a^3b + 6a^2b^2 + 4ab^3 + b^4. Setting a = 1 and b = 1 shows why each row adds up to a power of two: row 4 sums to 16, which is 2 to the fourth power. Row 9 sums to 512.

Example 3: a large entry

C(30,15) = 155117520 is the middle of row 30, the last row the slider reaches. Row 60 pushes the same idea to C(60,30) = 118264581564861424, an 18-digit number the calculator prints in full.

Patterns to look for

Symmetry

Every row reads the same forwards and backwards, because C(n,k) = C(n,n-k). Choosing which items to take is the same as choosing which to leave.

Row sums and powers of 11

Row n adds up to 2 to the power n. The first five rows also read as powers of 11: 1, 11, 121, 1331 and 14641.

Diagonals

The second diagonal counts 1, 2, 3, 4 and so on. The third holds the triangular numbers 1, 3, 6, 10, 15. Adding the shallow diagonals gives the Fibonacci sequence.

Privacy

Nothing is uploaded; every calculation runs in your browser and never leaves your device. The page keeps no history and needs no account.

Common uses

  • Expanding binomials such as (x + y) to a power without multiplying them out.
  • Counting combinations, from committee selections to card hands.
  • Probability with coin flips: the entries of row n give the number of ways to get k heads in n tosses.
  • Teaching number patterns, with a copyable table you can paste into a document or spreadsheet.

Related tools

The Exponent Calculator evaluates the powers behind row sums, the Number List Calculator adds up a copied row, and the Random Number Generator draws numbers for your own experiments.

Frequently asked questions

What is Pascal's triangle?

It is a triangle of numbers in which each row starts and ends with 1 and every other number is the sum of the two numbers above it. Row 0 is 1, row 1 is 1 1, row 2 is 1 2 1, and so on. The entries are binomial coefficients, which count combinations and give the coefficients of expanded binomials.

How are rows and positions numbered?

Both start at 0. The top 1 is row 0, and the first number in every row is position 0. The entry in row n at position k is written C(n,k). For example C(7,3) = 35 is the fourth number in the eighth row.

How many rows can I show?

The slider covers 0 to 30 rows, and you can type any number of rows from 0 to 60 into the number field. Values above 30 keep the slider at its maximum but still draw the full triangle. Wide triangles scroll sideways inside their own panel.

Are the large numbers exact?

Yes. The calculator uses arbitrary-precision integers, so every entry is exact. The middle of row 60 is 118264581564861424, a value that exceeds the range in which ordinary floating-point numbers stay exact.

What does the second panel calculate?

It computes a single binomial coefficient C(n,k), the number of ways to choose k items from n, for n up to 1000. It shows the formula with your numbers, the full result, the number of digits and a copy button. C(1000,500), for example, has 300 digits.

How can I copy the triangle into a spreadsheet?

Use Copy as CSV to copy one row per line with commas between the numbers, which spreadsheets split into columns when you paste. Copy as text gives the same rows with spaces between the numbers.

Why does each row add up to a power of two?

Row n holds the coefficients of (1 + 1) to the power n, so its entries sum to 2^n. Row 4 is 1 4 6 4 1, which adds to 16, and row 9 adds to 512.

Is anything sent to a server?

No. The triangle and every coefficient are calculated in your browser and never leave your device. Copying the rows as text or CSV also happens locally, through your own clipboard, with no upload.

Other related tools