Tetrahedral Number Calculator

This tetrahedral number calculator works out the nth tetrahedral number, the count of spheres you could stack into a solid triangular pyramid with n layers, like a pile of cannonballs or oranges built up in a tetrahedron shape. You enter the index n, any whole number from 1 to 1,000,000, and the calculator instantly returns three figures: the tetrahedral number itself, Te(n), the next tetrahedral number in the sequence, and the triangular base number T(n), the count of spheres in just the bottom layer of the pyramid. The underlying formula is Te(n) equals n times (n plus 1) times (n plus 2), divided by 6, and because each tetrahedral number is simply the running total of the triangular numbers up to that layer, the sequence climbs quickly: 1, 4, 10, 20, 35 and onward. This makes the tool handy for students and teachers working through figurate numbers, for programmers checking combinatorial formulas, and for anyone curious about the maths behind stacked-sphere puzzles. Type in your index number and the result updates straight away, with large results grouped using commas for easy reading. Because tetrahedral numbers also form the third diagonal of Pascal’s triangle, the calculator doubles as a quick way to check that relationship. A worked example, the formula, and background on how tetrahedral numbers relate to triangular numbers are set out further down the page.

Advertisement
Te(4) = 20
Next tetrahedral number35
Triangular base T(n)10

The formula

The nth tetrahedral number is Te(n) = n(n + 1)(n + 2) / 6. It is the sum of the first n triangular numbers, and the sequence begins 1, 4, 10, 20, 35.

Worked example

For n = 4, Te(4) = 4 times 5 times 6 divided by 6 = 120 / 6 = 20. Enter 4 to confirm.

Frequently asked questions

What is a tetrahedral number?

The number of items in a triangular pyramid of n layers, n(n+1)(n+2)/6, like stacked cannonballs.

How do they relate to triangular numbers?

Each tetrahedral number is the running total of the triangular numbers up to that layer.

Where do they appear in Pascal’s triangle?

Along the third diagonal, as the values C(n+2, 3).

Who this calculator is for

This calculator is for students, programmers and anyone exploring number theory.

What this calculator assumes

  • You enter a whole number within the stated range.
  • The exact integer algorithm is used.
  • Very large results are shown grouped for readability.

Formula and sources

Related calculators

If you've found a bug, or would like to contact us, or learn more about James Graham and Calculate.co.nz.

Calculate.co.nz is partnered with Interest.co.nz for New Zealand's highest quality calculators and financial analysis.

Calculate.co.nz is the sister site of CalculatorHub.com, the world's largest calculator website by tool count.

All calculators and tools are provided for educational and indicative purposes only and do not constitute financial advice.

Calculate.co.nz is proudly part of the Realtor.co.nz group, New Zealand's leading property transaction literacy platform, helping Kiwis understand the home buying and selling process from start to finish. Whether you're a first home buyer navigating your first property purchase, an investor evaluating your next acquisition, or a homeowner planning to sell, Realtor.co.nz provides clear, independent, and trustworthy guidance on every step of the New Zealand property transaction journey.

Calculate.co.nz is also partnered with Health Based Building and Premium Homes to promote informed choices that lead to better long-term outcomes for Kiwi households.

Calculate.co.nz is hosted in Auckland by SiteHost New Zealand.

All content on this website, including calculators, tools, source code, and design, is protected under the Copyright Act 1994 (New Zealand). No part of this site may be reproduced, copied, distributed, stored, or used in any form without prior written permission from the owner.

About & trust: Why Calculate is NZ's most comprehensive · By the Numbers · How we compare · Editorial standards · How we keep data current · NZ finance glossary · Research & data · Financial literacy NZ · About · Privacy policy · Terms of use

Reviewed and maintained. Last reviewed 2026-08-15 and checked on a twice-monthly cycle against IRD, RBNZ and Stats NZ. How we keep data current.

© 2026 Calculate.co.nz. All rights reserved. Building free NZ calculators since 2011.