Sum of Natural Numbers Calculator

Sum 1 through n with Gauss’s formula.

How to use

  1. Enter your values in the fields above.
  2. Press Calculate to see your result instantly.
  3. Use the Share button to copy a link to your result.

About this calculator

The sum of the first n natural numbers, 1 + 2 + 3 + ... + n, is given by the closed-form formula n × (n + 1) divided by 2 — famously attributed to a young Carl Friedrich Gauss, who is said to have instantly solved the sum of 1 through 100 in his schoolroom by pairing the first and last terms, each pair summing to 101.

This formula is a foundational result in discrete mathematics, used to derive other summation formulas, count the number of handshakes in a group or edges in a complete graph, calculate triangular numbers, and analyze the running time of nested-loop algorithms in computer science, where a loop that does 1, then 2, then 3 operations up to n follows exactly this pattern.

This calculator takes any value of n and instantly returns the sum of all natural numbers from 1 to n using Gauss's formula.

Was this helpful?

Comments (0)

  • Be the first to comment.

Popular calculators

All Calculators