Logo

MonoCalc

/

Triangular Number Calculator

Math

Try an Example

T(10)

T(10) = 55

Combinatorial equivalent: C(11, 2) = 55

Gauss Pairing Derivation
1+2+...+10 written forwards, plus 10+9+...+1 written backwards, pairs each column to 11. That's 10 pairs of 11, so 2×T(10) = 110, and T(10) = 55.

Dot Arrangement for n = 10

About This Tool

Triangular Number Calculator – Find, Check, and Sum T(n)

A triangular number T(n) is the sum of every natural number from 1 to n, and also the number of dots needed to arrange objects in an equilateral triangle: 1, 3, 6, 10, 15, 21, 28, .... The closed-form formula T(n) = n(n+1)/2 lets you compute any term instantly without adding up n numbers one by one. This calculator also solves the reverse problem — given a number, is it triangular, and if so, at which index — plus range sums, sequence generation, and the combinatorial link to Pascal's triangle.

The Formula: T(n) = n(n+1)/2

Every triangular number can be computed directly. For n = 10, T(10) = 10 × 11 / 2 = 55. Because one of n and n+1 is always even, the division by 2 is exact — no fractions ever appear, and this calculator computes the multiplication and division with BigInt so the result stays exact no matter how largen gets.

Gauss's Pairing Trick

The formula has a famous proof attributed to a young Carl Friedrich Gauss. Write the sum 1 + 2 + ... + n forwards, then write it again backwards underneath: n + (n−1) + ... + 1. Adding the two rows column by column, every pair sums to the same value, n + 1, and there are n such pairs. That gives 2 × T(n) = n × (n+1), so T(n) = n(n+1)/2. This calculator's derivation panel walks through the pairing step by step for whichever index you enter.

Checking Whether a Number Is Triangular

To test a number N, solve n(n+1)/2 = N for n using the quadratic formula, which rearranges to n = (−1 + √(1+8N)) / 2. If 1 + 8N is a perfect square and the resulting n is a non-negative whole number, N is triangular. For example, N = 55 gives 1 + 8(55) = 441 = 21², so n = (21 − 1)/2 = 10 — confirming 55 is T(10). The square-root test uses a BigInt-based integer square root, so even enormous numbers are checked exactly rather than with floating-point approximation.

Summing a Range with Tetrahedral Numbers

Adding up a whole range of triangular numbers, like T(5) + T(6) + ... + T(10), doesn't require looping term by term. The running sum of the first n triangular numbers is itself a closed-form value called a tetrahedral number: n(n+1)(n+2)/6. A range sum from n₁ to n₂ is then just the difference of two tetrahedral numbers, computed in constant time regardless of how wide the range is.

The Handshake Problem and C(n+1, 2)

Triangular numbers show up constantly in combinatorics. If n+1 people are in a room and each shakes hands with every other person exactly once, the total number of handshakes is C(n+1, 2) = T(n). This is the same identity that places triangular numbers along the third diagonal of Pascal's triangle. Every result in this calculator is shown alongside its C(n+1, 2) restatement as an alternate way to reach the same answer.

Square Triangular Numbers and Other Special Cases

A handful of triangular numbers are also perfect squares — these are called square triangular numbers, and they get rarer very quickly: 1, 36, 1225, 41616, .... For instance T(8) = 36 = 6². The calculator automatically checks every result against this property, along with the much rarer case of a triangular number coinciding with a perfect number such as 6 or 28.

When to use this tool
Use the Triangular Number Calculator for combinatorics and discrete math homework, verifying a figurate-number pattern, or exploring recreational number theory. To expand full binomial coefficients or explore the surrounding rows of Pascal's triangle, pair it with the Pascal's Triangle Generator.

Frequently Asked Questions

Is the Triangular Number Calculator free?

Yes, Triangular Number Calculator is totally free :)

Can I use the Triangular Number Calculator offline?

Yes, you can install the webapp as PWA.

Is it safe to use Triangular Number Calculator?

Yes, any data related to Triangular Number Calculator only stored in your browser (if storage required). You can simply clear browser cache to clear all the stored data. We do not store any data on server.

How does the Triangular Number Calculator work?

It computes T(n) = n(n+1)/2 directly for a given index, or solves the inverse problem n = (−1 + √(1+8N)) / 2 to check whether a number is triangular. All arithmetic uses native BigInt with a custom integer square-root routine, so results stay exact even for very large numbers.

What is a triangular number?

A triangular number T(n) is the sum of all natural numbers from 1 to n, and also the number of dots needed to arrange objects in an equilateral triangle: 1, 3, 6, 10, 15, 21, and so on. T(n) also equals C(n+1, 2), the number of ways to choose 2 items from n+1.

How can I tell if a number is triangular?

A number N is triangular exactly when 1+8N is a perfect square. Switch to "Check" mode, enter the number, and the tool tests this condition precisely with BigInt arithmetic, reporting the matching index n if one exists, or the two nearest triangular numbers if not.

What is a square triangular number?

It's a number that is both triangular and a perfect square, like 1, 36 (T(8) = 6²), and 1225 (T(49) = 35²). The calculator automatically flags this property whenever it applies to a computed or checked result.

How large a number can this calculator handle?

Indices up to 1,000,000 are supported, and every result is computed exactly with BigInt rather than floating-point math, so there's no precision loss even when a value exceeds Number.MAX_SAFE_INTEGER. Scientific notation display is available for very large results.

What is the Gauss pairing trick shown in the derivation?

It's the classic proof that T(n) = n(n+1)/2: writing the sum 1+2+...+n forwards and backwards and adding column by column pairs every term into n pairs that each sum to (n+1), giving a total of n(n+1), which is then halved.