Skip to main content
Number tools100% FreeInstant

Triangular and Polygonal Number Calculator

This free calculator finds figurate numbers: triangular, square, pentagonal, hexagonal, heptagonal and octagonal. Give n to get the nth number, or give a number to test if it belongs to the sequence.

By Debmedia Technologies LLP · Kolkata, India · Updated

What Is It and When Do You Need It?

Figurate numbers count dots arranged in regular shapes. They connect geometry to number patterns, and they show up in puzzles and programming exercises.

Choose a shape, a mode and a number.

How to Use This Tool

  1. Enter or paste your input in the box or boxes above.
  2. Choose the options, if there are any.
  3. Press the button to run the tool.
  4. Read the result and use the copy button where one is shown.

How the Calculation Works

The nth s-gonal number is P(s, n) = ((s - 2)n² - (s - 4)n) / 2. To test a value P, the tool solves the quadratic for n using n = ((s - 4) + sqrt((s - 4)² + 8(s - 2)P)) / (2(s - 2)) and checks if n is a whole number. The first 15 terms are always listed.

Worked Example

The 10th triangular number is 55. The number 91 is triangular because it is the 13th term (13 x 14 / 2).

Common Uses

  • Maths puzzles.
  • Programming exercises.
  • Teaching patterns.
  • Counting arrangements, like bowling pins.

Tips and Common Mistakes

  • n must be a whole number from 1.
  • Very large values are limited to 1 quadrillion.
  • For square numbers use the square root to double check.
  • Check the first result against a case you already know, so you can trust the tool for the rest.
  • Nothing you type leaves your device. The work is done by your browser, so it also works with a slow connection once the page has loaded.

Next, you may need the Collatz sequence calculator, perfect number checker, prime number checker, GCD and LCM calculator.

Everything runs in your browser. Nothing you type is uploaded, stored or sent to any outside service.

Frequently Asked Questions

The count of dots in a triangle: 1, 3, 6, 10, 15. The nth one is n(n + 1) / 2.
For an s-sided polygon, the nth number is ((s - 2)n² - (s - 4)n) / 2.
It solves the formula for n. If n is a whole number the value is in the sequence.
Yes. Every hexagonal number is also triangular, which the tool shows.

Disclaimer: results are calculated in your browser from the numbers you enter. Check important results before you rely on them for money, health, safety or legal decisions.