Triangular Number Calculator

Use the Triangular Number Calculator to find the nth triangular number with the formula T_n = n(n+1)/2, check if a number is triangular, or list the first n triangular numbers.

805.6K uses Updated · 2026-05-05 Runs locally · zero upload
AD

How to Use Triangular Number Calculator

The Triangular Number Calculator has three modes to cover common tasks. Select the mode that matches what you need to find.

  1. Find T_n — Enter a positive integer n. The Triangular Number Calculator computes T_n = n(n+1)/2, shows the substitution step by step, and displays the sum expression 1 + 2 + … + n for small n.
  2. Check if triangular — Enter any non-negative integer. The Triangular Number Calculator applies the inverse formula to decide whether the number is a perfect triangular number, and if not, shows the nearest triangular numbers on either side.
  3. List triangular numbers — Specify how many terms you want (up to 50) and view a table of T_1 through T_n.

Each mode of the Triangular Number Calculator includes a step-by-step explanation so you can follow the arithmetic and use it in homework or study notes.

Formula & Theory - Triangular Number Calculator

The Triangular Number Calculator is built around the core formula for triangular numbers:

T_n = n(n+1) / 2 = 1 + 2 + 3 + ... + n
SymbolMeaning
nA positive integer — the position in the sequence
T_nThe nth triangular number

This formula follows directly from the sum of an arithmetic series with first term 1 and common difference 1. The closed-form expression n(n+1)/2 was famously used by Gauss as a child to quickly sum the integers from 1 to 100.

Inverse formula (checking if T is triangular):

n = (-1 + √(1 + 8T)) / 2

If this value is a positive integer, then T = T_n for that n. If not, the number is not triangular.

Triangular number sequence

The first few triangular numbers are: 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, 105, 120, …

Connection to other concepts

Triangular numbers appear in combinations: T_n = C(n+1, 2) = (n+1)! / (2! × (n−1)!). They also equal the number of handshakes among (n+1) people, and every perfect number known so far is related to triangular numbers.

Assumptions and Limits

For very large n (approaching 1,000,000), the Triangular Number Calculator still returns the exact integer result because JavaScript handles integers up to 2⁵³ accurately. Beyond 1,000,000, the tool will show an error rather than a potentially imprecise answer.

Use Cases for Triangular Number Calculator

The Triangular Number Calculator is useful for a wide range of mathematical and practical scenarios:

  • Sequences and series — Verify or explore the triangular number sequence as part of a discrete mathematics or combinatorics course.
  • Sum of integers — Quickly find the sum of all integers from 1 to n without adding them individually.
  • Puzzle solving — Determine whether a given count of objects (such as pins in bowling) can form a perfect triangle.
  • Figurate numbers — Compare triangular numbers with square numbers, pentagonal numbers, and other polygonal numbers.

The Triangular Number Calculator also serves as a quick reference for anyone who needs to check membership in the triangular number sequence during mathematical problem solving.

Frequently asked questions about Triangular Number Calculator

What is a triangular number?

A triangular number counts objects arranged in an equilateral triangle. The nth triangular number equals 1 + 2 + 3 + ... + n = n(n+1)/2. For example, T_4 = 10 because you can arrange 10 dots into a triangle with 4 dots on each side.

How does the Triangular Number Calculator check if a number is triangular?

It solves n(n+1)/2 = T for n using the quadratic formula: n = (-1 + √(1 + 8T)) / 2. If n is a positive integer, then T is triangular.

What is the largest n supported?

The Triangular Number Calculator supports n up to 1,000,000. For larger values, JavaScript's floating-point arithmetic may lose precision.

Is my data stored?

No. All calculations happen in your browser; nothing is sent to a server.