Skip to content
Omnikalc

Triangular numbers calculator: find the n-th term and test a number

Enter a position n to get the n-th triangular number and the tetrahedral number, or enter any number to see whether it is triangular and which triangular numbers lie next to it.

Updated on
Your inputs

Value out of range

Value out of range

Results

The n-th triangular number

5,050

Position of your number in the sequence

10.0000

It is a triangular number
Sum of the first n triangular numbers (tetrahedral number)
171,700
Triangular number just below or equal
55
Triangular number just above or equal
55

1, 3, 6, 10, 15, 21… The triangular numbers count the dots in a triangle built row by row. This triangular numbers calculator takes a position n to give the n-th triangular number and the tetrahedral number, and takes any number to test to show its position in the sequence, whether it is triangular and the neighbors on each side.

How the calculation works

  • Triangular number Tₙ = n × (n + 1) ÷ 2, the sum of the whole numbers from 1 to n.
  • Tetrahedral number = n × (n + 1) × (n + 2) ÷ 6, the sum of the first n triangular numbers.
  • Position of a number N in the sequence = (√(8N + 1) − 1) ÷ 2. If this is a whole number, N is triangular.
  • Neighbors = the triangular numbers at the whole positions just below and above that position.

Example

The 100th triangular number is 100 × 101 ÷ 2 = 5,050, the answer to the famous schoolboy sum of 1 + 2 + … + 100. The sum of the first 100 triangular numbers is 171,700. To test 55, the position is (√441 − 1) ÷ 2 = 10, a whole number, so 55 is the 10th triangular number.

Why it matters

Triangular numbers are the formula behind the sum of the first n whole numbers, which comes up in programming loops, handshake and round-robin tournament counts, stacking oranges or cans and many number puzzles. The closed formula replaces a long sum by one multiplication, and the test shows how to recognize them.

Good to know

The formula n(n + 1) ÷ 2 is exact for whole numbers n, and results grow quickly: for n beyond about 10 million the numbers pass 10¹⁴, where decimal precision can fail. The test for a triangular number uses a square root, so for very large values rounding can give a wrong answer in the last digits. The position of a non-triangular number is shown with decimals, and the nearest triangular numbers on each side are given. The number 1 is the first triangular number, and some authors also count 0.

The arithmetic-geometric series calculator handles other sums, the sequence calculator covers arithmetic and geometric progressions and the combinations calculator counts pairs, which gives triangular numbers.

Frequently asked questions

What is a triangular number?

It is a number of dots that can be arranged in an equilateral triangle: 1, 3, 6, 10, 15, 21, and so on. The n-th one is the sum of the whole numbers from 1 to n.

How do I know if a number is triangular?

N is triangular if 8N + 1 is a perfect square. The calculator tests this by finding the position (√(8N + 1) − 1) ÷ 2 and checking whether it is a whole number.

Where do triangular numbers appear?

In the handshake problem (n people shake hands in pairs, giving Tₙ₋₁ handshakes), in bowling pins, in pool racks, in the number of diagonals and in Pascal's triangle.

What is the sum of two consecutive triangular numbers?

It is always a square: Tₙ + Tₙ₋₁ = n². For example, 10 + 6 = 16 = 4².

Was this calculator helpful?

Thanks for your feedback!

Results are estimates provided for information purposes. They do not replace professional advice.