Pascal's Triangle Calculator
Generate rows of Pascal's triangle.
Loading tool…
About this tool
Enter a number of rows to print Pascal's triangle. Six rows end with 1 5 10 10 5 1.
How to use
1
Step 1
Enter the number of rows (1 to 20).
2
Step 2
Press Calculate.
3
Step 3
Read the triangle, one row per line.
How it works
Each entry is the sum of the two above it, and the entry in row n, position k is the binomial coefficient C(n, k). Row 4 (1 4 6 4 1) gives the expansion of (a + b)⁴. Each row sums to a power of 2, and shallow diagonals sum to Fibonacci numbers.
C(n, k) = C(n − 1, k − 1) + C(n − 1, k) row n sums to 2ⁿ
Worked example
Six rows
- Input
- rows = 6
- Output
- 1 / 1 1 / 1 2 1 / 1 3 3 1 / 1 4 6 4 1 / 1 5 10 10 5 1
- Walkthrough
- In the last row, 10 = 4 + 6 from the row above, and 5 = 1 + 4.
Limitations
- Limited to 20 rows; a request for 100 returns the first 20. Rows must be a whole number of at least 1.
- Counts rows from 1, so row 1 is just 1.
Questions
What is the 6th row of Pascal's triangle?
1 5 10 10 5 1.
What is the largest number in the 20th row?
92,378, which appears twice in the middle.
How does it relate to combinations?
Row n, position k is C(n, k).
Features
- Up to 20 rows
- Binomial coefficients
- Runs in your browser
Related resources
Guides and videos from around the web—opens on YouTube or the publisher’s site.
Rectangle area as product of dimensions
Khan Academy
Foundational area thinking across math tools.
Watch on YouTubeAverage or Central Tendency
Khan Academy
When to prefer mean vs median in tool output.
Watch on YouTube
- Probability
Math is Fun
Probability basics for combo and chance calculators.
- OpenStax Math
OpenStax
Free textbooks for algebra through calculus.