Triangular Number Calculator

Find the nth triangular number, the next one, and digit count fast.

Math and PercentUpdated 2026-10-162 min read
Triangular Number Calculator
Whole number 1 to 1000000. T(100) is 5050.
T(n)
...
T(n+1)...
Digits in T(n)...

What it does

Triangular numbers count dots that form a triangle. One row has 1 dot, next adds 2, then 3, and so on. The total after n rows is the nth triangular number, written T(n). Bowling pins, pool racks, and handshake counts all follow this pattern.

The tool above returns T(n), the next triangular number T(n+1), and the digit count of T(n). The default n = 100 matches the worked example, so the page opens showing 5,050. Type a new n to update all three results.

The closed form n(n+1)/2 replaces long addition. Summing 1 to 100 by hand takes many steps and invites error. The formula needs one multiplication, one addition, and one halving. It also explains why T(n) grows near n squared over 2.

These numbers link to combinations: T(n) equals C(n+1, 2), the ways to pick 2 from n+1. That is why handshake problems use the same math. In a room with n+1 people, each pair shaking once gives T(n) handshakes.

This page shows the formula, a full hand checked example at n = 100, a short table of early values, and practice checks that run through the tool.

How to use

  1. Pick the position n you need, for example 100 for the sum 1 to 100.
  2. Type n as a whole number. Fractions trigger an error.
  3. Keep n between 1 and 1000000 to stay in exact integer range.
  4. Read T(n) as the main result.
  5. Read T(n+1) to see the next triangle, useful for spotting growth.
  6. Use digit count to plan storage or display width for large T(n).

Formula

T(n) = n x (n + 1) / 2, for whole n of 1 or more.
n
Position in the sequence, a whole number.
T(n)
Sum 1 + 2 + ... + n.
T(n+1)
Next triangular number after T(n).

The product n(n+1) is always even, so division by 2 stays whole. For n = 1, T = 1. Values above n = 1000000 are blocked to keep integer math exact and fast.

Worked example

Example: n = 100

Find the sum 1 + 2 + ... + 100 with the triangular formula.

  1. Write n = 100.
  2. Add one: n + 1 = 101.
  3. Multiply: 100 x 101 = 10,100.
  4. Halve: 10,100 / 2 = 5,050.
  5. Read T(100) = 5,050 with 4 digits.
  6. Next: T(101) = 101 x 102 / 2 = 10,302 / 2 = 5,151.

Reference table

First triangular numbers for quick checks
nT(n)Sum it replaces
111
231 + 2
361 + 2 + 3
4101 + 2 + 3 + 4
10551 to 10
1005,0501 to 100

Limits

  • Whole n only. Fractions and negatives have no triangular meaning here.
  • Capped at n = 1000000 to keep results exact in browser math.
  • Counts dots and pairs, not areas. Do not mix with square numbers.
  • Large T(n) needs commas and width. Check digit count before printing.

Common mistakes

  • Using n squared over 2 and dropping the +1, so T(100) becomes 5000 instead of 5050.
  • Adding 1 after halving instead of before multiplying.
  • Entering n = 0 and expecting a triangle. This tool starts at n = 1.
  • Confusing T(n) with n factorial, which grows far faster.
  • Reading T(n+1) as T(n) plus n + 2. It is T(n) plus n + 1.

Try it yourself

Quick checks. Answers sit tucked under each question.

T(10)?

10 x 11 / 2 = 55. Next is 66 with 2 digits.

T(1000)?

1000 x 1001 / 2 = 500,500. Next is 501,501 with 6 digits.

Questions

What is a triangular number?

n(n+1)/2. It equals 1 + 2 + ... + n.

Why is T(100) 5050?

100 x 101 / 2 = 5050. Pairing 1+100, 2+99, and so on gives fifty pairs of 101.

Are triangular numbers the same as handshake numbers?

Yes. Handshakes among n+1 people equal T(n).

What is the next triangular after T(n)?

T(n+1) = (n+1)(n+2)/2. The gap is n+1.

Can n be a fraction?

Not in this tool. n must be a whole number from 1 to 1000000.

How fast does T(n) grow?

Near n squared over 2. Doubling n roughly quadruples T(n).

Sources

How this page was checked. The formula above was matched against the cited sources, and the worked example was run through the tool on this page before publishing. If you spot an error, contact us so we can fix it and note the correction.