HomeCalculatorsMathBasic ArithmeticSum Calculator
Math calculator

Sum Calculator

Add decimal lists exactly, find totals and means, or check long addition with carry steps. Supports negatives, scientific notation, and shareable results.

Instant result
Result
—

Enter values to calculate.

Inputs—
Mode—
Formula—
Trust summary CVP VERIFIED · CVP protocol 1.0.0-proposed · Core assurance
Input interpretation
Enter values to calculate.
Result
—
Assurance
Core
Declared partition coverage
PASS · 5/5 declared partitions (sum-exact-decimal, sum-scientific, long-integer, long-decimal, invalid-domain) · Matrix
Numerical scope
76 independent complete packs across exact decimal, scientific binary64 and bounded Long modes; every prefix/work/flag checked. Sampled domain, no universal ULP guarantee.
Known limitations
  • Declared partitions are sum-exact-decimal, sum-scientific, long-integer, long-decimal, invalid-domain — aligned with published algorithms (exact-decimal vs Neumaier) and Long addition integer/decimal work. O2 checks complete packs, every running-total prefix, mean representation flags and full Long column work.
  • Core CVP does not include live graph, viewport, or pointer interaction.
Model
The sum of a numeric list, and optionally long-addition column work for non-negative addends.
Scope
Tokens are parsed as decimal numbers; scientific notation is allowed in Sum mode only.
Verification
Engine tested · Source checked · v1.0.3 · CVP VERIFIED · CVP protocol 1.0.0-proposed · Core assurance· View Manifest · CVP overview · Specification
Versions
Calculation 1.0.3 · CVP protocol 1.0.0-proposed · Evidence 2026-10-22.sum-complete-contract-v1
Verification revision
2026-10-22.sum-complete-contract-v1 · 3/3 property · digest 52fe61f7c520
Legacy regression
31/31 tests · Production surface contract 6/6
Trust layers
Verification VERIFIED · Production CURRENT · Overall CVP state: VERIFIED under CVP 1.0.0-proposed
Reference
O1 model · O2 expected_values · O2 numerical_behavior
Interfaces
PASS · UI (SSR) / REST / MCP — ui-ssr is query-result HTML, not a live browser session. Error-path engine·REST·MCP 1/1 (status, code, calculation_version). SSR compared on URL-canonical requested calculations; empty query is idle (not an error) and JSON-typed object/array inputs are REST/MCP-only.
Supplemental domain review
Not performed
Named expert review
Not performed
CVP suite
76/76 golden · 6/6 CVP boundary · 9/9 invalid · 3/3 property · 1/1 metamorphic · 8/8 cross-interface · 6/6 CVP contract · Manifest
Sources
Sources
Methods
  • Exact decimal summation for finite decimal tokens
  • Neumaier compensated summation when scientific notation is present
  • Place-value long addition with carrying
Evidence
24 legacy golden · 7 legacy boundary · legacy regression suite · 76/76 oracle-backed golden · 9/9 invalid · Artifact integrity PASS
This calculator CURRENT · Public schema 1.0.3 matches · Semantic contract ✓ · Production attested · Public/cache ✓ · Origin ✓
Semantic contract
PASS
Full verification

Manifest identity, reference classes, interfaces, suite, and production records.

Formulas

Core equations used by this calculator.

SumSum = Σᵢ₌₁ⁿ xᵢ
Meanx̄ = (1/n) Σᵢ₌₁ⁿ xᵢ
Mean from the sumMean = Sum / n
iLong addition aligns place values (including decimals), adds each column from right to left, and carries tens to the next column. Plain decimals are added in base-10; scientific notation uses Neumaier compensated summation.

How to use

1

Choose a mode

Sum totals any list (including negatives). Long addition shows place-value column work for non-negative numbers.

2

Enter numbers

Separate values with commas, spaces, or new lines. You can paste a column from a spreadsheet.

3

Read the total

Sum mode also shows count and mean. Long addition prints the stacked work under the form.

Example calculations

Common configurations with formula and result.

ϟ

Mixed list

Sample data set

−66.25 + (−37.5) + 40 + 42 + 47 + 53 + 54 + 59 + 65
256.25
ϟ

Three positives

5, 10, 15

5 + 10 + 15
30
ϟ

Long addition

937 + 129 + 2248

column carry
3314
ϟ

Decimals

37.5 + 129.44 + 48.123

align decimal points
215.063

Sum calculator specification

Version 1.0.3 · Engine tested

Calculation status

Review policy · Evidence

Definition
A sum is the total of a set of numbers added together. Summation adds each value xᵢ once: Sum = x₁ + x₂ + … + xₙ. Long addition is the same total computed column by column with carrying.
What it calculates
The sum of a numeric list, and optionally long-addition column work for non-negative addends.
Inputs
  • One or more numbers separated by commas, spaces, or new lines
  • Mode: Sum or Long addition
Outputs
  • Sum (total)
  • Count and arithmetic mean (Sum mode)
  • Place-value work with carries (Long addition mode)
Formula
Sum = Σ xᵢ; x̄ = (1/n) Σ xᵢ; Mean = Sum / n
Assumptions
  • Tokens are parsed as decimal numbers; scientific notation is allowed in Sum mode only.
  • Units are not parsed: enter numeric tokens only, for example 5,3 for values measured in kg; 5 kg is rejected. Use a common unit for all inputs.
  • Thousands separators are not supported. A comma in 7,890 is a value separator (7 + 890), with a non-blocking warning.
  • Long addition pads decimal places with zeros so columns align.
  • Plain decimal tokens are summed in base-10 (exact). Any scientific-notation token switches the list to Neumaier compensated IEEE-754 summation.
Units
  • Unit-agnostic. Inputs should use the same unit; the sum retains that unit.
Boundary conditions
  • Empty input returns no sum.
  • Any invalid token stops parsing with an error.
  • Negative values are rejected in Long addition mode.
  • Long addition rejects scientific notation.
  • Sum: 10000 values;65536 total characters;512 per token;plain decimals at most48 significant digits and fractional places.
  • Long:32 nonnegative values and48 aligned columns. Nonzero scientific underflow, nonfinite intermediate sums, unknown keys and conflicting aliases rejected.
Numerical precision
  • Plain decimals: exact base-10 addition (0.1 + 0.2 = 0.3).
  • Scientific notation: Neumaier compensated summation on IEEE-754 binary64 values.
  • Mean shows ≈ with 4 decimal places when Sum/n is a repeating decimal.
Example
937 + 129 + 2248 = 3314
Validation cases

26 published on this page · 31/31 tests · Production surface contract 6/6 · View evidence

  • 1, 2, 3 → 6
  • -1, -2, -3 → -6
  • -10, 5, 8 → 3
  • 0.1, 0.2 → 0.3
  • 0, 0, 0 → 0
  • 42 → 42
  • 1e3, 2e3 → 3000
  • 1e-12, 2e-12 → 3e-12
  • 10000000000000000, 1, -10000000000000000 → 1
  • 1e16, 1, -1e16 → 1
  • -66.25, -37.5, 40, 42, 47, 53, 54, 59, 65 → 256.25
  • 5, 10, 15 → 30
  • 10, 5 → 15
  • +3, +4 → 7
  • 1\n2\n3 (multiline) → 6
  • 4 5 (whitespace) → 9
  • 7,890 → 897 (7 + 890; thousands-separator warning)
  • 1\t2\t3 (tabs) → 6
  • 00.50, 1.50 → 2
  • 1e8, 2e8 → 300000000
  • 937, 129, 2248 (long) → 3314
  • 37.5 + 129.44 + 48.123 (long) → 215.063
  • 0.1, 0.2 (long) → 0.3
  • (empty) → no sum
  • 1, two, 3 → invalid token
  • -1, 2 (long) → rejected (negatives)
Methods
  • Exact decimal summation for finite decimal tokens
  • Neumaier compensated summation when scientific notation is present
  • Place-value long addition with carrying
Sources
  • CalculatorX mathematical conventions — Neumaier compensated summation for scientific-notation lists
    Supports: Plain decimals sum in base-10; a scientific-notation token switches the list to compensated IEEE-754 summation.
  • Margaret Stevens — The Maths Workbook (University of Oxford) — Chapter 1, §1: Algebraic Expressions and Fractions; §3: Equations
    Supports: Addition of algebraic terms, decimal fractions and equation transformations. Supports the addition model; does not validate CalculatorX implementation or the compensated-summation algorithm and is not an endorsement.
  • Arnold Neumaier — Rundungsfehleranalyse einiger Verfahren zur Summation endlicher Summen (1974) — Compensated summation and rounding-error analysis
    Supports: Primary source for compensated-summation methods. Numerical error depends on conditioning and conversion; no universal ULP bound or CalculatorX endorsement is claimed.
Calculation version
1.0.3

Background

Interpretation and common distinctions.

What does this sum calculator compute?

A sum is the total of a set of numbers added together. Summation adds each value xᵢ once: Sum = x₁ + x₂ + … + xₙ. Long addition is the same total computed column by column with carrying.

The published formula or method is Sum = Σ xᵢ; x̄ = (1/n) Σ xᵢ; Mean = Sum / n. The following references support the stated mathematics or method:

  • Margaret Stevens — The Maths Workbook (University of Oxford): Addition of algebraic terms, decimal fractions and equation transformations. Supports the addition model; does not validate CalculatorX implementation or the compensated-summation algorithm and is not an endorsement.

  • Arnold Neumaier (1974): Primary compensated-summation and rounding-error source, ZAMM 54, 39–51; not a validation or endorsement of this implementation.

Which inputs and limits should you check?

Sum accepts 1–10,000 values, at most 65,536 characters in the list and 512 per token. Plain decimals allow 48 significant digits and 48 fractional places. Long addition accepts 1–32 non-negative plain decimals with at most 48 aligned columns. Units are not parsed. Preserve exact strings, warnings and numerical flags when citing results.

The worked example uses Sample data set with −66.25 + (−37.5) + 40 + 42 + 47 + 53 + 54 + 59 + 65. Compare it with the Example calculations and the complete result for the same inputs.

How can you verify and cite this result?

CalculatorX is responsible for this page. The mathematical references above explain the model; implementation checks and their scope are documented separately in the math.sum v1.0.3 Evidence and capability contract. Read the displayed verification and production state together with the specification's numerical limits.

Use the clean calculator URL to cite the tool. A shared input link identifies a particular calculation. Content updates, numerical verification, and domain reviews have separate dates and scopes.

What this calculator does

Use it to:

  1. Sum a data set — any count of numbers, including decimals and negatives.
  2. Long addition — the same total for non-negative numbers, with stacked place-value steps and carries.

A sum is simply the total after addition. You might sum people per floor to get building occupancy, line items on a receipt, or a statistics sample before computing a mean.

How to enter numbers

Accepted layouts (all become the same list):

Style Example
Commas 42, 54, 65, 47
Spaces 42 54 65 47
New lines one number per line
Mixed commas, spaces, and blank lines together

Do not use a comma as a thousands separator. Write 7890, not 7,890. If you enter 7,890, it is read as 7 + 890 = 897 and the result includes a non-blocking warning.

Sum formula

Sum = sum(i=1)ⁿ xᵢ = x₁ + x₂ + ⋯ + xₙ

The arithmetic mean is the same total divided by the count:

barx = 1/nsum(i=1)ⁿxᵢ

which is also:

Mean = Sum/n

Sum mode shows both the total and the mean so you can move straight into average-style checks without a second tool. When the mean is a repeating decimal it is labelled with ≈ (for example 256.25 / 9 ≈ 28.4722).

Long addition

Long addition is addition by place value:

  1. Stack the numbers and align columns (ones under ones, tenths under tenths).
  2. Add each column from right to left.
  3. Write the ones digit of the column total; carry any tens to the next column on the left.

Whole-number example: 937 + 129 + 2248

    937
    129
+  2248
  -----
   3314
  • Ones: 7 + 9 + 8 = 24 → write 4, carry 2
  • Tens: 2 + 3 + 2 + 4 = 11 → write 1, carry 1
  • Hundreds: 1 + 9 + 1 + 2 = 13 → write 3, carry 1
  • Thousands: 1 → write 1

Decimal example: 37.5 + 129.44 + 48.123

Align decimal points (pad with zeros if needed), then add the same way:

   37.500
  129.440
+  48.123
  -------
  215.063

How the engine adds

  • Plain decimals (including mixed signs) are added in base-10, so 0.1 + 0.2 = 0.3 exactly — not the IEEE-754 sequential total 0.30000000000000004.
  • Scientific notation (1e3, 2e-12) uses Neumaier compensated summation, which is more stable than naive left-to-right addition when large and small terms cancel.
  • Long addition is the schoolbook place-value algorithm with carrying. It matches the exact decimal total for non-negative addends.

sumStr and display are authoritative exact strings for plain decimals and Long addition. Numeric sum, value, mean, values and chart are binary64 conveniences. sum_numeric_approximate and mean_numeric_approximate describe numeric representation; mean_rational_exact (compatibility alias mean_exact) describes an exact source, not an exact JSON number. Terminating rational means display in full; repeating means round half away from zero to four decimal places. Long mode exposes only a convenience numeric mean and no exact-mean claim.

A scientific token selects the floating model for the whole list. Cancellation can amplify input/conversion errors, even with compensation; no universal ULP guarantee or measurement uncertainty model is provided. Scientific totals use shortest binary64 round-trip text, and rounded means use ≈. chart[] contains every numeric prefix (exact-decimal prefixes converted to binary64, or compensated binary64 prefixes); it is machine data, not a displayed interactive chart.

Typing computes locally. Sharing a URL sends its inputs to the server and may put them in browser history, analytics or infrastructure logs. REST/MCP receive submitted inputs on the server. Recent calculations may persist in local browser history and can be cleared. See the privacy policy for service handling; fixed retention periods, deletion guarantees and processing regions are not asserted here. Shared links execute the current engine, not a preserved historical runtime. Links are limited to 8,000 encoded bytes; larger local lists keep complete JSON/CSV exports but disable link copying and history replay. Reload does not retain that local list.

Worked sum example

Numbers: -66.25, -37.5, 40, 42, 47, 53, 54, 59, 65

−66.25 + (−37.5) + 40 + 42 + 47 + 53 + 54 + 59 + 65 = 256.25

Count = 9 · mean ≈ 28.4722.

Agent / API notes

  • Capability engine sum · page /calc/math/add · REST /api/v1/calc/sum (alias /api/v1/calc/add) · calculation_version 1.0.3
  • Share URL: ?mode=sum|long&sumInput=… is server-rendered (the HTML includes the computed sum, not an empty result shell).
  • Input separators: commas, whitespace (spaces, tabs, new lines), semicolons and pipes. sumInput, input and a are list-text aliases. values also accepts an array of numeric strings or safe JSON numbers. Numeric array members are converted to shortest binary64 text first, which may select scientific mode; use strings to preserve notation. Multiple aliases must contain identical trimmed tokens in the same order; raw presentation uses sumInput, then values, input, a. Unknown fields, null/blank array members and unsafe numeric integers are rejected; send exact large integers as strings.
  • Non-blocking warning: THOUSANDS_SEPARATOR_AMBIGUITY when a comma group looks like thousands grouping (7,890 → 7 + 890).
  • Stable errors: MISSING_REQUIRED_INPUT, INVALID_NUMBER, INVALID_MODE, VALUE_MUST_BE_NON_NEGATIVE, UNSUPPORTED_FORMAT, TOO_MANY_VALUES, TOO_MANY_DIGITS, INVALID_INPUT, CONFLICTING_INPUT, UNKNOWN_INPUT, NUMERIC_UNDERFLOW, NUMERIC_RANGE, INPUT_TOO_LONG. Nonzero scientific underflow and nonfinite intermediate totals are errors; rescale extreme inputs.

Tips

  • Prefer Sum when you only need a total or mean.
  • Prefer Long addition when teaching place value or checking handwritten work.
  • For percent of a total, use the Percentage Calculator after you have the sum.
  • Pair with Subtraction, Multiplication, or Division for the other basic operations.

Frequently asked questions

Key distinctions behind the calculation.

What is a sum?

The sum is the result of addition — the total of every number in the set. The operation is also called summation.

What formats can I paste?

Comma-separated, space-separated, one number per line, or mixed. Do not use commas as thousands separators (write 1234, not 1,234). If you type 7,890 it is read as 7 + 890 = 897 and a warning is shown.

How is long addition different from Sum?

Both compute the same total for non-negative numbers. Long addition also shows stacked place-value columns and carry steps for learning or checking work.

Can I add negative numbers?

Yes in Sum mode. Long addition is limited to non-negative values; switch to Sum for signed data.

How do I get the average from a sum?

Mean = sum ÷ count, or x̄ = (1/n) Σ xᵢ. Sum mode reports both. Repeating means are labelled with ≈ (256.25 / 9 ≈ 28.4722).

Why is 0.1 + 0.2 equal to 0.3 here?

Plain decimal inputs are added in base-10, so 0.1 + 0.2 is exactly 0.3. Many JavaScript calculators accumulate IEEE-754 binary floats and show 0.30000000000000004. Scientific notation uses Neumaier compensated summation instead.

What about a + b only?

Enter two numbers in the list (for example 10, 5). The sum is still a + b.