StatGardenREF. DESK
Calculators/Maths/Triangle Number Calculator
Maths

Triangle Number Calculator

The nth triangular number, the sum of 1 to n, or checks whether a given number is one.

Published 27 August 2026

What this calculator does

A triangular number is what you get by stacking dots into a triangle: 1 dot, then a row of 2 under it, then a row of 3, and so on. Add up all the dots and you get the nth triangular number, T(n). The sequence runs 1, 3, 6, 10, 15, 21, 28… and it turns up anywhere something is being paired off or counted cumulatively, from handshake problems to scheduling round-robin tournaments.

The triangle number formula, T(n) = n(n+1)/2, is a shortcut for adding up every whole number from 1 to n without actually doing the addition. This calculator works in either direction: give it n and it returns T(n), or give it a number and it tells you whether that number is triangular, and which two triangular numbers it sits between if not.

The formula

FormulaT(n) = n(n+1)/2, the sum of the whole numbers from 1 to n. A number x is triangular if n = (√(8x+1) − 1)/2 is a whole number

To find T(n), multiply n by (n+1) and divide by 2. To check whether a number x is triangular, solve the formula backwards: n = (√(8x+1) − 1) / 2. If that comes out to a whole number, x is triangular and that whole number is its position in the sequence; if not, the calculator rounds down to show the nearest triangular number either side.

TermMeaning
T(n)The nth triangular number: the sum of every whole number from 1 to n.
nThe position in the sequence, a positive whole number.
xA number being tested for whether it is triangular.

The inputs explained

FieldWhat to enter
What to findChoose whether you want to calculate T(n) from a position n, or check a specific number.
nThe position in the sequence, used when finding T(n).
Number to checkThe number to test, used when checking whether it is triangular.

When to use it

Round-robin scheduling

In a round-robin tournament of n teams, the total number of matches needed for every team to play every other team once is the (n−1)th triangular number, since each new team added plays one more game than the last.

Handshake and pairing problems

The number of handshakes in a room of n people, or the number of unique pairs that can be formed from n items, is the (n−1)th triangular number: each person shakes hands with everyone who arrived before them.

Spotting a pattern in a sequence

If a sequence of totals looks like it is growing by one more each time (1, 3, 6, 10…), checking whether a term is triangular confirms whether it follows this well-known pattern rather than a coincidence.

Worked examples

Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.

What are the first ten triangular numbers?

The triangular numbers grow by one more than the previous gap each time.

T(n) for n = 1 to 10
nTriangular number T(n)
11
23
36
410
515
621
728
836
945
1055
Each term adds n to the previous one: T(4) = T(3) + 4 = 6 + 4 = 10, and so on, which is exactly what the stacked-dots picture shows.

Is a given number triangular?

Not every number is triangular; here are a few checked against the formula.

Checking several numbers at once
NumberResult
21Yes, T(6) = 21
25No
45Yes, T(9) = 45
50No
66Yes, T(11) = 66
100No
21 and 45 and 66 are triangular (T(6), T(9) and T(11)); 25, 50 and 100 are not, and sit between two triangular numbers instead.

Questions

What is the formula for a triangular number?

T(n) = n(n+1)/2, where n is a positive whole number. It comes from pairing the sequence 1+2+…+n with itself reversed, which turns every pair into (n+1), repeated n times, then halved.

How do I check if a number is triangular?

Solve n = (√(8x+1) − 1)/2 for your number x. If n comes out as a whole number, x is triangular; if it has a decimal part, it sits between the two triangular numbers either side of it.

Are triangular numbers the same as an arithmetic sequence?

A triangular number is the running total (the sum) of the arithmetic sequence 1, 2, 3, 4… up to n, rather than a term of that sequence itself. The arithmetic sequence gives you each step; the triangular number gives you the accumulated total after n steps.

What is the 100th triangular number?

T(100) = 100 × 101 ÷ 2 = 5,050, a figure often mentioned alongside the story of a young Gauss summing 1 to 100 quickly by spotting this exact pairing trick.

For a running total of a general arithmetic sequence rather than the fixed 1,2,3… case, see the arithmetic sequence calculator.