Arithmetic Series Sum Calculator Formula

Understand the math behind the arithmetic series sum calculator. Each variable explained with a worked example.

Formulas Used

Num Terms

num_terms = floor((end_val - start_val) / step_val) + 1

Sum Val

sum_val = (floor((end_val - start_val) / step_val) + 1) / 2 * (start_val + start_val + floor((end_val - start_val) / step_val) * step_val)

Average Val

average_val = (start_val + start_val + floor((end_val - start_val) / step_val) * step_val) / 2

Variables

VariableDescriptionDefault
start_valStart Value1
end_valEnd Value100
step_valStep1

How It Works

Arithmetic Series Sum

Formula (Gauss's Method)

Sum = n/2 × (first + last)

where n is the number of terms.

Famous Example

Gauss reportedly summed 1 to 100 as a child: Sum = 100/2 × (1 + 100) = 50 × 101 = 5050.

General Formula

For a series from a to b with step d:

  • Number of terms: floor((b - a) / d) + 1
  • Sum = n/2 × (first + last)
  • Worked Example

    Sum all integers from 1 to 100.

    start_val = 1end_val = 100step_val = 1
    1. 01Number of terms = 100
    2. 02Sum = 100/2 × (1 + 100)
    3. 03= 50 × 101
    4. 04= 5050

    Ready to run the numbers?

    Open Arithmetic Series Sum Calculator