Triangular Number Calculator
The nth triangular number is the running total of the first n counting numbers: 1 + 2 + 3 and so on up to n. It is named because that many dots can be stacked into a neat equilateral triangle, and the sequence 1, 3, 6, 10, 15 appears throughout combinatorics and geometry. This calculator uses the exact closed form, T(n) = n(n + 1) / 2, so you get the result instantly without adding each term by hand. It also shows the index, the next triangular number and the gap to it.
Triangular number formula
T(n) = n * (n + 1) / 2
T(n+1) = T(n) + (n + 1)
2 * T(n) = n * (n + 1)
The closed form gives the sum of the first n integers in one step. Multiplying T(n) by two recovers the product n(n + 1), which is always even, so T(n) is always a whole number.
About triangular numbers
- The sequence begins 1, 3, 6, 10, 15, 21, 28, 36, 45, 55.
- T(n) counts how many handshakes occur when n + 1 people each shake hands once.
- The sum of two consecutive triangular numbers is a perfect square.
- Triangular numbers are the binomial coefficient C(n+1, 2), so they appear on Pascal's triangle.
- The number 6 is both triangular and perfect, and 36 is both triangular and square.
Triangular numbers: frequently asked questions
What is a triangular number?
The nth triangular number is the sum of the first n positive integers: 1 + 2 + 3 + ... + n. It counts the dots needed to form an equilateral triangle with n dots on each side. The sequence begins 1, 3, 6, 10, 15.
What is the formula for the nth triangular number?
T(n) = n times (n + 1) divided by 2. For n = 4 this gives 4 times 5 divided by 2, which equals 10. The formula was famously used by Gauss to add the numbers 1 to 100 quickly.
What is the next triangular number after T(n)?
Each triangular number is the previous one plus the next integer: T(n+1) = T(n) + (n + 1). So after T(4) = 10, the next is T(5) = 10 + 5 = 15.
Are triangular numbers related to square numbers?
Yes. The sum of two consecutive triangular numbers is always a perfect square: T(n-1) + T(n) = n squared. Also, eight times a triangular number plus one is always an odd perfect square.
Does n have to be a whole number?
For the classic triangular number sequence, n is a positive integer. This calculator requires a positive whole number so the result counts an exact triangular arrangement of dots.
Official sources
- NIST Digital Library of Mathematical Functions: Lattice Paths and Binomial Coefficients.
- National Institute of Standards and Technology DADS: Dictionary of Algorithms and Data Structures.
Reviewed by the CalculatorHub team, edited by James Graham, 16 June 2026. See our methodology.