Pascal's Triangle Calculator

Enter a row number and position to get any Pascal's Triangle entry via the binomial coefficient formula C(n,k), plus the full row, its sum, and the count of odd entries.

Quick Facts

Entry formula
C(n,k) = n! / (k!(n-k)!)
n is the row (from 0), k is the position within the row (from 0 to n).
Build rule
C(n,k) = C(n-1,k-1) + C(n-1,k)
Every interior entry is the sum of the two entries above it; edges are always 1.
Row sum
Sum of row n = 2^n
Follows from the binomial theorem with x = y = 1.
Symmetry
C(n,k) = C(n,n-k)
Each row reads the same forwards and backwards.

Your Results

Calculated
Entry C(n,k)
-
Value at row n, position k
Full Row n
-
All entries C(n,0) … C(n,n)
Row Sum
-
2^n
Odd Entries in Row
-
2^(number of 1 bits in n)

Ready

Enter a row number and position, then press Calculate.

Formula and method for Pascal's Triangle

Pascal's Triangle is a triangular array of numbers where row 0 is a single 1, and every subsequent row starts and ends with 1, with each interior number equal to the sum of the two numbers directly above it. Each entry also has a closed-form value: the entry at row n, position k (both counted from 0) is the binomial coefficient C(n,k) = n! / (k!(n-k)!). This calculator computes any single entry, the entire row it belongs to, the row's sum, and how many entries in that row are odd.

How the calculation works

Enter a row number n (0-indexed, so row 0 is the top of the triangle) and a position k within that row (also 0-indexed, ranging from 0 to n). The calculator plugs both values into C(n,k) = n! / (k!(n-k)!) to get the single entry, then repeats the formula for every position from 0 to n to build the full row. The row's sum always equals 2^n — a direct consequence of the binomial theorem, since (1+1)^n expands to the sum of every C(n,k) in that row. The calculator also counts how many of those entries are odd, which by Kummer's theorem always equals 2 raised to the number of 1s in the binary representation of n.

Common mistakes

  • Off-by-one indexing: both the row number and the position within a row start at 0, not 1. Row 6 has 7 entries (positions 0 through 6), not 6.
  • Position outside the row: k must satisfy 0 ≤ k ≤ n. A position larger than the row number does not exist — for example, there is no "position 5" in row 3.
  • Confusing the entry with the row sum: a single entry C(n,k) is one number in the triangle; the row sum (2^n) is the total of every entry in that row — they answer different questions.

Real-world applications

  • Expanding binomials: the coefficients of (x + y)^n are exactly row n of Pascal's Triangle, used throughout algebra and calculus.
  • Probability and combinatorics: C(n,k) counts the number of ways to choose k items from a set of n, the basis for binomial probability distributions (e.g., coin-flip outcomes).
  • Combinatorial proofs and identities in discrete mathematics and computer science, including counting subsets and lattice paths.
  • Recreational mathematics: shading the odd entries of Pascal's Triangle produces the Sierpinski triangle fractal.

Frequently Asked Questions

What is Pascal's Triangle and how is it built?
Pascal's Triangle is a triangular array of numbers where row 0 is just "1" and every other entry is the sum of the two numbers directly above it, with a 1 at the start and end of every row. Row n of the triangle lists the binomial coefficients C(n,0) through C(n,n).
How do I find a specific entry in Pascal's Triangle?
Use the binomial coefficient formula C(n,k) = n! / (k!(n-k)!), where n is the row number starting at 0 and k is the position within that row starting at 0. For example, row 6 position 3 gives C(6,3) = 720 / (6×6) = 20.
What is the sum of the numbers in row n of Pascal's Triangle?
Every entry in row n sums to 2^n. This follows from the binomial theorem: setting x = y = 1 in (x+y)^n = sum of C(n,k) x^(n-k) y^k gives 2^n as the sum of all the row's binomial coefficients.
Why do the odd numbers in Pascal's Triangle form a fractal pattern?
Shading only the odd entries of Pascal's Triangle produces the Sierpinski triangle fractal. The exact count of odd entries in row n equals 2 raised to the number of 1s in the binary representation of n, a consequence of Kummer's and Lucas' theorems on binomial coefficients modulo 2.