Triangular Numbers Calculator
- T(n) = n × (n + 1) / 2 = 10 × 11 / 2 = 55.
- Counted out, that is 1 + 2 + 3 + … + 10: the dots form a triangle with 10 rows.
- A neighbour check: T(9) = 45, and T(10) + T(9) = 100 = 100, exactly 10 squared.
A triangular numbers calculator finds the nth triangular number for any positive integer you enter. The nth triangular number is T(n) = n(n+1)/2, which represents the number of dots in a triangular arrangement with n rows. Triangular numbers are the running totals of the counting numbers, producing the sequence 1, 3, 6, 10, 15, 21, 28, 36, 45, 55. For example, T(10) = 55, and T(100) = 5,050, the sum Gauss famously produced as a schoolboy by pairing 1 with 100. The calculator also determines whether any whole number is triangular, since a whole number x is triangular exactly when 8x + 1 is a perfect square.
The formula T(n) = n(n+1)/2 is the accepted standard for triangular number calculations because it provides a direct, closed-form solution instead of requiring sequential addition. This page shows the formula, step-by-step workings, worked examples, and sources so you can verify every result. You can explore notable cases such as T(36) = 666, the largest triangular number made of one repeated digit, and the property that neighboring triangular numbers pair into squares: T(9) + T(10) = 45 + 55 = 100 = 10 squared. Each calculation is broken down so you can follow the method and confirm the math yourself.
Worked examples
Ten pins
Primary result: 55 — ten rows of dots, and T9 + T10 make 100, exactly 10 squared. (10)
| Triangular number T10 | 55 |
| Previous triangular number T9 | 45 |
| T10 + T9 (always a square) | 100 |
A hundred rows
Primary result: 5,050 — the sum young Gauss famously produced by pairing 1 with 100. (100)
| Triangular number T100 | 5,050 |
| Previous triangular number T99 | 4,950 |
| T100 + T99 (always a square) | 10,000 |
Thirty-six rows
Primary result: 666 — the largest triangular number made of one repeated digit. (36)
| Triangular number T36 | 666 |
| Previous triangular number T35 | 630 |
| T36 + T35 (always a square) | 1,296 |
The triangular number formula
The nth triangular number is T(n) = n(n+1)/2, which gives the number of dots in a triangular arrangement with n rows. To see why this formula works, think of triangular numbers as running totals of the counting numbers: 1, 3, 6, 10, 15, 21, 28, 36, 45, 55. Each number adds a new row to the triangle. T(1) is just 1, T(2) is 1 + 2 = 3, T(3) is 1 + 2 + 3 = 6, and so on. So T(n) is the sum of all whole numbers from 1 through n.
Now pair the smallest and largest terms to derive the formula. Instead of adding 1 + 2 + 3 + ... + n one at a time, write the sum twice, once forward and once backward: 1 + 2 + 3 + ... + n and n + (n-1) + (n-2) + ... + 1. Each pair adds up to n + 1. Since there are n pairs, the combined total is n times (n + 1). Because you wrote the sum twice, divide by 2, giving T(n) = n(n+1)/2. This is the same trick a schoolboy Carl Friedrich Gauss used to pair 1 with 100 and quickly find T(100) = 5,050.
Verify the formula with a known value. For T(10), plug n = 10 into n(n+1)/2: 10 times 11 equals 110, divided by 2 equals 55. That matches the tenth number in the sequence, confirming the formula works. A triangular numbers calculator applies this same calculation instantly for any n you enter, so you can check values like T(36) = 666, the largest triangular number made of one repeated digit.
The formula also reveals a useful test: a whole number x is triangular exactly when 8x + 1 is a perfect square. For example, with x = 55, the calculation 8 times 55 plus 1 gives 441, which is 21 squared, confirming 55 is triangular. Neighboring triangular numbers also pair into squares: T(9) + T(10) = 45 + 55 = 100, which equals 10 squared.
The first twenty triangular numbers
The first twenty triangular numbers follow directly from the formula T(n) = n(n+1)/2, which counts the dots in a triangular arrangement with n rows. Because each triangular number is the running total of the counting numbers, you can build the sequence by adding 1, then 2, then 3, and so on. The sequence begins 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, and it keeps climbing as n grows. A triangular numbers calculator uses this same relationship to produce any term instantly, but seeing the first twenty laid out together reveals a pattern that single calculations often hide.
Notice how the gap between one triangular number and the next gets larger as you move down the table. The jump from T(1) to T(2) is only 2, but by the time you reach the jump from T(19) to T(20), the gap has widened to 20. This happens because each new term adds the next counting number to the previous total. T(10) = 55, for instance, equals T(9) plus 10. The growing gaps are a direct consequence of the formula: as n increases, the value added at each step increases right along with it.
These first twenty values also hint at deeper connections that the table makes visible. Neighbouring triangular numbers pair into squares, a fact you can check early in the sequence. T(9) + T(10) = 45 + 55 = 100, which equals 10 squared. Later terms show other curiosities: T(36) = 666, the largest triangular number made of one repeated digit, though that lies well beyond the first twenty. Even within this smaller range, the steady widening of the gaps prepares you for how quickly triangular numbers climb. T(100) = 5,050, the sum Gauss famously produced as a schoolboy by pairing 1 with 100, and the same pairing logic underlies every entry in the table below.
| n | T(n) = n(n+1)/2 | Gap from previous term |
|---|---|---|
| 1 | 1 | — |
| 2 | 3 | 2 |
| 3 | 6 | 3 |
| 4 | 10 | 4 |
| 5 | 15 | 5 |
| 6 | 21 | 6 |
| 7 | 28 | 7 |
| 8 | 36 | 8 |
| 9 | 45 | 9 |
| 10 | 55 | 10 |
| 11 | 66 | 11 |
| 12 | 78 | 12 |
| 13 | 91 | 13 |
| 14 | 105 | 14 |
| 15 | 120 | 15 |
| 16 | 136 | 16 |
| 17 | 153 | 17 |
| 18 | 171 | 18 |
| 19 | 190 | 19 |
| 20 | 210 | 20 |
The Gauss classroom story
As a schoolboy, the future mathematician Carl Friedrich Gauss faced a teacher's busywork assignment: add every whole number from 1 through 100. Instead of grinding through the addition one term at a time, Gauss spotted a shortcut. He paired the first number with the last, writing 1 beside 100, 2 beside 99, 3 beside 98, and so on down the list. Every pair added to 101, and there were 50 such pairs, so the answer was 50 times 101, equaling 5,050.
That classroom story is the same derivation behind the formula for triangular numbers. When you pair the counting numbers from 1 up to n, each pair sums to n + 1, and you get n divided by 2 such pairs. The total is n(n+1)/2, which is exactly T(n), the nth triangular number. Plugging in n = 100 gives T(100) = 100 times 101 divided by 2, which confirms the 5,050 Gauss produced.
A triangular numbers calculator applies this same pairing logic so you do not have to. Enter any positive whole number for n, and the tool returns T(n) instantly, whether n is small or large. The calculator also lets you confirm related properties, such as whether a given whole number x is triangular by checking whether 8x + 1 is a perfect square.
The pairing trick is more than a neat shortcut for the 1-to-100 problem. It shows why triangular numbers are the running totals of the counting numbers: 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, and so on. Each new term adds the next counting number to the previous total, and the formula captures that accumulation in one compact expression.
Checking whether a number is triangular
A triangular numbers calculator can tell you instantly whether any whole number belongs to the triangular sequence, but the underlying test is simple enough to do by hand. The rule rests on a direct algebraic link between triangular numbers and perfect squares: a whole number x is triangular exactly when 8x + 1 is a perfect square. This condition is both necessary and sufficient, meaning every triangular number passes the test and every non-triangular number fails it.
To see why the test works, start from the formula for the nth triangular number, T(n) = n(n+1)/2. If x is triangular, then x = n(n+1)/2 for some whole number n. Multiplying both sides by 8 gives 8x = 4n(n+1), and adding 1 produces 8x + 1 = 4n(n+1) + 1 = 4n squared + 4n + 1, which equals (2n + 1) squared. So 8x + 1 is always the square of an odd number whenever x is triangular. Reversing the algebra confirms the converse: if 8x + 1 is a perfect square, you can recover n from it, which means x must be triangular.
Here is a worked check on 666. First compute 8 times 666 + 1, which gives 5,329. Next ask whether 5,329 is a perfect square. It is: 73 squared equals 5,329. Because 8 x 666 + 1 = 5,329 = 73 squared, the number 666 passes the test and is confirmed triangular. In fact, 666 is the largest triangular number made of one repeated digit, and it equals T(36).
The same test rejects non-triangular numbers just as cleanly. Take x = 20. Then 8 x 20 + 1 = 161, and no whole number squared equals 161, since 12 squared = 144 and 13 squared = 169. So 20 is not triangular. When you use a triangular numbers calculator, it is applying precisely this perfect-square check behind the scenes, whether the input is small enough to inspect at a glance or large enough that doing the arithmetic by hand would be impractical.
Where triangular numbers appear
Triangular numbers show up in everyday counting problems more often than you might expect. Consider a group of people who all shake hands with one another exactly once. In a group of n people, the total number of handshakes equals the triangular number T(n-1), because the first person shakes n-1 hands, the second person shakes n-2 new hands, and so on down to one final handshake. A triangular numbers calculator can quickly confirm that a gathering of 10 people produces 45 handshakes, which is T(9).
Bowling-pin arrangements offer another visible example. The 10 pins at the start of a lane form a triangle with 4 rows: 1 pin in front, then 2, then 3, then 4 in back. That layout holds T(4) = 10 pins total. The same triangular stacking appears whenever objects are arranged in rows that grow by one each time, from produce displays to tournament brackets.
In combinatorics, triangular numbers answer a basic question: how many pairs can you form from a set of n items? The number of ways to choose 2 items from n, written as n choose 2, equals T(n-1). This is because choosing a pair is the same as counting all possible connections between n elements, which again builds the triangular pattern 1, 3, 6, 10, 15, and so on.
Triangular numbers also pair up to create perfect squares in a neat way. When you add two neighboring triangular numbers, the result is always a square. The clearest illustration is T(9) + T(10) = 45 + 55 = 100, which equals 10 squared. Picture two triangular dot patterns sitting side by side, one with 9 rows and one with 10 rows; together they fill a 10-by-10 square grid. This relationship gives triangular numbers a quiet but steady role behind many geometric and algebraic identities.
FAQs
What is a triangular number?
A triangular number counts the dots arranged in an equilateral triangle. The sequence begins 1, 3, 6, 10, 15, 21 and so on. Each number represents the total dots needed to form a complete triangular pattern, with one more dot added to each successive row.
How do you find the nth triangular number?
Use the formula T(n) = n(n+1)/2. Multiply n by the next integer, then divide by 2. For n = 10 that is 10 x 11 / 2 = 55. This formula works for any positive integer n, giving you the corresponding triangular number quickly and accurately.
What is the 100th triangular number?
The 100th triangular number is 5,050. Using the formula T(n) = n(n+1)/2, you calculate 100 x 101 / 2, which equals 5,050. This represents the total dots in a triangle with 100 dots along its bottom row.
How can I check whether a number is triangular?
Multiply by 8 and add 1; if the result is a perfect square, the number is triangular. For 666: 8 x 666 + 1 = 5,329 = 73 squared. Since 5,329 is a perfect square, 666 is a triangular number. This test works for any positive integer.
Why are triangular numbers equal to sums 1+2+...+n?
Each new row adds one more dot than the row before, so the triangle total is the sum of the first n counting numbers. The first row has 1 dot, the second has 2, the third has 3, and continuing this pattern creates the sum 1+2+...+n.
What is the difference between triangular and tetrahedral numbers?
Triangular numbers stack dots in a flat triangle (2D); tetrahedral numbers stack spheres in a pyramid (3D). Triangular numbers count dots in a single layer, while tetrahedral numbers count spheres stacked in layers, building upward to form a three-dimensional pyramid shape.