Triangular Numbers Calculator

Compute T(n) = n(n+1)/2 for any n, or check whether a given number is triangular. Shows the running sum and the index n when a match is found.

🔺 Triangular Numbers Calculator
Index n10
T(0)T(100)
T(n)
Formula
Is Triangular?
Index

🔺 What is a Triangular Number?

Triangular numbers count the dots needed to build an equilateral triangle: 1 dot for the smallest triangle, then rows of 2, 3, 4, and so on stacked underneath. The nth triangular number, written T(n), is the sum of every whole number from 1 to n: T(n) = 1 + 2 + 3 + ... + n. The sequence begins 0, 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, and keeps growing, always one row larger than the last.

Triangular numbers show up constantly outside pure mathematics. They count the number of handshakes possible among a group of people, the number of games needed in a round-robin tournament, the number of pairwise comparisons a nested loop performs in computer science, and the way pool balls, bowling pins, or stacked cannonballs are arranged. A rack of 15 pool balls is arranged as T(5) = 15, and ten bowling pins form T(4) = 10.

A common misconception is that finding a large triangular number requires adding every integer one by one. It doesn't: the closed-form formula T(n) = n(n+1)/2 gives the exact answer instantly, no matter how large n is. This formula is famously attributed to a young Carl Friedrich Gauss, who is said to have spotted the pairing trick (1+100, 2+99, 3+98, ...) to sum 1 through 100 almost instantly as a schoolboy exercise.

This calculator offers two complementary tools. Find T(n) computes any triangular number directly from its index, showing the multiplication and, for smaller n, the full addition chain. Check Number does the reverse: given any whole number, it determines whether that number is triangular and, if so, recovers the index n that produces it, along with the nearest triangular numbers when it is not a match.

📐 Formula

T(n)  =  n × (n + 1) ÷ 2
n = the index (a whole number, n ≥ 0)
T(n) = the sum 1 + 2 + 3 + ... + n
Reverse test: x is triangular when 8x + 1 is a perfect square; then n = (−1 + √(8x + 1)) ÷ 2
Example: T(10) = 10 × 11 ÷ 2 = 55

📖 How to Use This Calculator

Steps

1
Choose a mode – select Find T(n) to compute a triangular number from its index, or Check Number to test whether a given value is triangular.
2
Enter the input – for Find T(n), type or slide to choose n from 0 to 1,000,000. For Check Number, type any whole number of 0 or more.
3
Read the results – Find T(n) shows the total, the n × (n+1) ÷ 2 formula, and the full addition chain for n up to 12. Check Number shows Yes or No, the matching index n if found, and the two nearest triangular numbers otherwise.

💡 Example Calculations

Example 1 — The 10th Triangular Number

Find T(10)

1
Apply the formula: T(10) = 10 × 11 ÷ 2 = 55
2
Verify by adding: 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 = 55
T(10) = 55
Try this example →

Example 2 — The 100th Triangular Number

Find T(100)

1
Apply the formula: T(100) = 100 × 101 ÷ 2 = 10,100 ÷ 2 = 5,050
2
This is the exact sum Gauss is said to have found in seconds: 1 + 2 + ... + 100 = 5,050
T(100) = 5,050
Try this example →

Example 3 — Checking a Triangular Number

Is 210 a triangular number?

1
Compute 8x + 1 = 8(210) + 1 = 1,681
2
Is 1,681 a perfect square? √1681 = 41, which is a whole number ✓
3
n = (−1 + 41) ÷ 2 = 20. Check: T(20) = 20 × 21 ÷ 2 = 210 ✓
210 = T(20). Yes, it is triangular.
Try this example →

Example 4 — A Non-Triangular Number

Is 100 a triangular number?

1
Compute 8x + 1 = 8(100) + 1 = 801
2
√801 ≈ 28.30, not a whole number, so 100 is not triangular
3
The nearest triangular numbers are T(13) = 91 and T(14) = 105
100 is not triangular. It sits between T(13) = 91 and T(14) = 105.
Try this example →

❓ Frequently Asked Questions

What is a triangular number?+
A triangular number is the sum of all whole numbers from 1 to n, written T(n) = 1 + 2 + 3 + ... + n. It gets its name from the fact that this many dots can be arranged in an equilateral triangle, with 1 dot in the top row and n dots in the bottom row. The sequence starts 0, 1, 3, 6, 10, 15, 21, 28, 36, 45, 55.
What is the formula for triangular numbers?+
T(n) = n(n+1)/2. For example, T(10) = 10 × 11 ÷ 2 = 55, and T(100) = 100 × 101 ÷ 2 = 5,050. This closed-form formula computes the result instantly for any n, avoiding the need to add every integer one by one.
How do I check if a number is triangular?+
A whole number x is triangular exactly when 8x + 1 is a perfect square. Compute n = (−1 + √(8x+1)) ÷ 2; if the result is a non-negative whole number, x is triangular and equals T(n). Example: x = 55 gives 8(55)+1 = 441 = 21², so n = (−1+21)/2 = 10, confirming T(10) = 55.
Is 56 a triangular number?+
No. 8(56)+1 = 449, and √449 ≈ 21.19 is not a whole number, so 56 fails the triangular test. It sits between T(10) = 55 and T(11) = 66, the two nearest triangular numbers.
Who discovered the triangular number formula?+
The formula n(n+1)/2 is famously associated with a story about the young Carl Friedrich Gauss, who is said to have summed 1 through 100 almost instantly by pairing the first and last terms: (1+100) + (2+99) + ... = 50 pairs, each summing to 101, giving 50 × 101 = 5,050. Whether the story is entirely accurate, the pairing insight is exactly the visual proof behind the formula.
How are triangular numbers related to combinations?+
T(n) equals the binomial coefficient C(n+1, 2), the number of ways to choose 2 items from a set of n+1 items. This is why triangular numbers count handshakes among n+1 people: each handshake is an unordered pair, and there are exactly n(n+1)/2 possible pairs.
What is the sum of two consecutive triangular numbers?+
T(n) + T(n−1) always equals a perfect square, n². For example, T(5) + T(4) = 15 + 10 = 25 = 5². Geometrically, two consecutive triangular arrangements of dots fit together to form a square grid, a classic visual proof taught in introductory number theory.
Are triangular numbers a type of polygonal number?+
Yes. Triangular numbers are the simplest member of the polygonal number family, which also includes square numbers (n²), pentagonal numbers (n(3n−1)/2), and hexagonal numbers (n(2n−1)). Each family counts dots arranged in a regular polygon shape with an increasing number of sides.
What are square triangular numbers?+
Square triangular numbers are numbers that are both triangular and perfect squares: 0, 1, 36, 1,225, 41,616, 1,413,721, and so on. They are generated by solving a Pell equation and grow rapidly. The first non-trivial example is T(8) = 36 = 6².
What are some real-world uses of triangular numbers?+
Triangular numbers count handshakes at a gathering of n+1 people, matches in a round-robin tournament (T(n−1) games for n teams), stacked objects like a 15-ball pool rack (T(5)=15) or 10-pin bowling setup (T(4)=10), and pairwise comparisons performed by nested loops in computer programs.
How fast do triangular numbers grow?+
Triangular numbers grow quadratically, roughly T(n) ≈ n²/2 for large n. This means T(1,000) = 500,500 and T(1,000,000) = 500,000,500,000. Even though the index n grows linearly, the value of T(n) grows much faster, doubling roughly every time n increases by about 41%.
What is T(0)?+
T(0) = 0, since the sum of zero terms is 0 by convention (an empty sum). It is the smallest triangular number and represents the trivial case of a triangle with no rows.

What is a triangular number?

A triangular number is the number of dots that can be arranged in an equilateral triangle, with one dot in the top row, two in the next, three in the next, and so on. The nth triangular number is the sum of all whole numbers from 1 to n: T(n) = 1 + 2 + 3 + ... + n = n(n+1)/2. The first few are 0, 1, 3, 6, 10, 15, 21, 28, 36, 45, 55.

What is the formula for triangular numbers?

T(n) = n(n+1)/2. For example, T(10) = 10 × 11 / 2 = 55 and T(100) = 100 × 101 / 2 = 5,050. This closed-form formula, attributed to the young Carl Friedrich Gauss, avoids adding every integer one by one and works instantly for any size of n.

How do I check if a number is triangular?

A whole number x is triangular if and only if 8x + 1 is a perfect square. Compute n = (−1 + √(8x + 1)) / 2; if n is a non-negative whole number, x is triangular and equals T(n). For example, x = 55: 8(55) + 1 = 441 = 21², so n = (−1 + 21)/2 = 10, confirming T(10) = 55.

Is 56 a triangular number?

No. 8(56) + 1 = 449, and √449 ≈ 21.19 is not a whole number, so 56 is not triangular. It falls between T(10) = 55 and T(11) = 66, which are the nearest triangular numbers on either side.

What is the relationship between triangular numbers and Gauss's trick?

As a schoolboy, Carl Friedrich Gauss is said to have quickly summed 1 through 100 by pairing the first and last terms: (1+100) + (2+99) + ... = 50 pairs of 101 = 5,050. This is exactly T(100), and the pairing trick is the intuitive proof behind the formula n(n+1)/2: pair up n terms into n/2 pairs, each summing to n+1.

How are triangular numbers related to combinations?

T(n) equals the binomial coefficient C(n+1, 2), the number of ways to choose 2 items from a set of n+1. This is because choosing 2 items from n+1 is equivalent to choosing an unordered pair, and there are exactly n(n+1)/2 such pairs. This connection makes triangular numbers appear throughout combinatorics, such as counting handshakes at a party of n+1 people.

What is the sum of two consecutive triangular numbers?

T(n) + T(n−1) always equals a perfect square: n². For example, T(5) + T(4) = 15 + 10 = 25 = 5². Geometrically, two consecutive triangles of dots fit together to form an n-by-n square, which is a classic visual proof used in number theory textbooks.

Are triangular numbers the same as polygonal numbers?

Triangular numbers are the simplest case of polygonal numbers, a family that also includes square numbers (n²), pentagonal numbers (n(3n−1)/2), and hexagonal numbers (n(2n−1)). Each family counts dots arranged in a regular polygon shape. Triangular numbers use the smallest polygon (3 sides), so they grow the slowest among all polygonal number families with more than 2 sides.

What are some real-world uses of triangular numbers?

Triangular numbers count handshakes among n+1 people, round-robin tournament games (T(n−1) matches for n teams), stacked objects like bowling pins (T(4)=10) or cannonballs, and the number of diagonals plus sides in certain polygon problems. They also appear in computer science when counting pairwise comparisons in nested loops, since a double loop comparing every pair runs in T(n−1) steps.

Can triangular numbers be negative?

The standard definition only covers n ≥ 0, giving T(0) = 0 as the smallest triangular number. Extending the formula n(n+1)/2 to negative n produces the same sequence of positive values in reverse order (T(−1) = 0, T(−2) = 1, T(−3) = 3, ...), a curiosity sometimes used in generating-function proofs, but it has no standard combinatorial meaning.

Which numbers are both triangular and square?

Numbers that are both triangular and square are called square triangular numbers: 0, 1, 36, 1225, 41616, 1413721, ... They grow rapidly and are generated by a Pell equation. The next one after 1 is T(8) = 36 = 6², and after that T(49) = 1225 = 35². These are a well-studied sequence in number theory (OEIS A001110).

How fast do triangular numbers grow?

Triangular numbers grow quadratically: T(n) ≈ n²/2 for large n. This means T(n) roughly doubles when n increases by about 41% (since (n·√2)² ≈ 2n²). By T(1000) = 500,500 and T(1,000,000) = 500,000,500,000, the values quickly become very large even though n grows only linearly.