Pascal's Triangle Calculator
A row of Pascal's triangle, the binomial coefficients it holds, and the row sum.
Each entry is the sum of the two above it, with ones down both edges.
How the pascal's triangle calculator works
Each entry is the sum of the two above it, with ones down both edges. Row n holds the binomial coefficients C(n,0) through C(n,n) — the number of ways to choose k things from n — which is why the row is also the coefficients of (a+b)ⁿ.
The row sums are powers of two, because choosing any subset of n things gives 2ⁿ possibilities and the row counts them by size. Row 4 is 1, 4, 6, 4, 1, summing to 16.
Beyond row 60 the coefficients exceed exact double precision and become approximate.
Formula: C(n,k) = n! / (k!(n−k)!); row sum = 2ⁿ
Worked examples
| Inputs | C(n, k) | Note |
|---|---|---|
| Row 6, entry 2 | 15 | 15 |
| Row 4 — the classic 1 4 6 4 1 | 6 | 6 |
| The top of the triangle | 1 | 1 |
FAQFrequently asked questions
What is Pascal's triangle?
A triangle of numbers where each entry is the sum of the two above it, with ones down the sides.
What is row 4?
1, 4, 6, 4, 1 — the coefficients of (a+b)⁴.
Why do the rows sum to powers of two?
Because row n counts every subset of n items grouped by size, and there are 2ⁿ subsets in total.
Is the first row 0 or 1?
By convention the single 1 at the top is row 0, which makes row n hold C(n,k) exactly.
What else is hidden in it?
The diagonals give the triangular and tetrahedral numbers, and shallow diagonals sum to the Fibonacci sequence.
Where these figures come from
- NIST Digital Library of Mathematical Functions — reference definitions for elementary and special functions
- Wolfram MathWorld — definitions and formulas for every topic on this page
- NIST/SEMATECH e-Handbook of Statistical Methods — the statistical formulas (mean, variance, z, confidence intervals, sample size)
- National curriculum in England — Mathematics — the terms and methods taught in UK schools
Last checked: September 2026. Formulas are fixed by mathematics and do not change with tax years or regulations.