Sum of Even Numbers Calculator
Total the evens up to n in one step.
Result
How it is calculated
The tool adds the even numbers 2 + 4 + 6 + … up to and including n (if n is itself even). It first counts them: k = ⌊n / 2⌋, rounding down. Then the sum is S = k × (k + 1), because 2 + 4 + … + 2k = 2 × (1 + 2 + … + k). So an odd limit such as 51 gives the same result as 50, since 51 is not itself even. n must be a whole number of at least 2; 0, 1, negatives and decimals give no result. Both the sum and the count are shown as integers with thousands separators. This is the sum of even numbers only, not of all numbers up to n.
Worked example
Add the even numbers up to 50. Count them: ⌊50 / 2⌋ = 25, so k = 25. The sum is k × (k + 1) = 25 × 26 = 650. The calculator shows a sum of 650 and a count of 25. As a check, 2 + 4 + … + 50 is an arithmetic series with 25 terms and average (2 + 50) / 2 = 26, and 25 × 26 = 650.
Common mistakes
- Entering the number of even terms as n. The tool expects the upper limit: for the first 25 even numbers enter 50, not 25.
- Expecting n = 51 to include 51. Only even numbers are added, so the last term is 50.
- Using n × (n + 1) / 2, which is the sum of all numbers rather than the even ones.
- Entering 1. The smallest even number is 2, so n = 1 gives no result.
- Using this for odd numbers. The sum of the first k odd numbers is k², a different formula.
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.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm’s Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Comments