Sum of Even Numbers Calculator

Total the evens up to n in one step.

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 every even number from 2 up to n follows a closed-form formula: if m is the count of even numbers up to n (m = n / 2, rounded down), the sum equals m × (m + 1), a direct consequence of the classic arithmetic-series result Gauss is famously said to have discovered as a schoolboy for summing consecutive integers.

This calculator is used in math education to demonstrate how a closed-form formula replaces manual addition or a loop-based sum, and it is a common early exercise in programming courses that teaches students to derive an O(1) formula instead of writing an O(n) loop to add up numbers one at a time.

Enter an upper limit n, and this calculator returns both the count of even numbers up to that limit and their total sum.

Was this helpful?

You can pick up to 3 reactions.

Comments (0)

  • Be the first to comment.

Popular calculators

All Calculators