Calculate a Running Sum
Calculate a cumulative sum of a list of numbers. Runs entirely in your browser, so your data never leaves your device.
0 chars · 0 lines
Output
The result appears here as you type.
How to use Calculate a Running Sum
- 1. Paste your list of numbers. Enter the numbers in order, separated by commas or line breaks. The tool adds them one at a time and reports the total after each addition.
- 2. Set the separator. Choose the Separator that joins the output values, such as a comma or a newline, so the running sum drops straight into a spreadsheet column or script.
- 3. Copy the running sum. Copy the sequence of prefix sums from the output. Each position is the total of every number from the start of the list up to that point.
When to use Calculate a Running Sum
Calculate a Running Sum adds a list of numbers one at a time and reports the cumulative total after each entry, also known as a prefix sum. It is for anyone who needs the trajectory of a total, not just its final value.
- Building a savings tracker. You have a list of monthly deposits into a savings account and want to see the account balance after each deposit rather than only the total at the end of the year.
- Charting daily sales growth. A retail spreadsheet lists daily sales figures, and you want the cumulative revenue for each day of the month to plot a running total chart for a manager.
- Verifying a prefix-sum algorithm. A developer implementing a prefix-sum array for a coding interview problem wants a quick reference output to check their function against before submitting the solution.
- Reconciling a step-by-step ledger. An accounting ledger lists individual transactions without a running balance column, and you need the balance after every line item to match against a bank statement.
Examples
Running sum of integers
Input
1, 2, 3, 4, 5
Output
1, 3, 6, 10, 15
Decimals and negatives
Input
2.5 -1 4
Output
2.5, 1.5, 5.5
About the Calculate a Running Sum tool
Calculate a Running Sum runs as plain JavaScript in your browser tab, with no server behind it. Calculate a cumulative sum of a list of numbers. Whatever you put in stays on your device from start to finish.
The tool is part of EditSafely's Number Tools section, 194 single-purpose utilities built around the same idea: open the page, get the result, keep your data to yourself.
You can shape the output with the Separator setting, and the result refreshes the moment you change it. 2 worked examples further down the page show exactly what the tool produces for real inputs.
That local-first design has practical benefits beyond privacy. The tool keeps working on a flaky connection once the page has loaded, results are instant because nothing round-trips to a server, and it is safe to use with confidential material.
Frequently asked questions
Is Calculate a Running Sum free to use?
Yes, it is completely free. All 2,658 tools on EditSafely work without an account, a subscription or usage limits.
Is it safe to paste sensitive or confidential data?
Everything happens locally. Your browser downloads the tool's code once, then does all the processing itself; nothing you enter is transmitted, stored or logged. You can even go offline after the page loads and it will still work.
How much text can I process at once?
There is no fixed limit. Because the work happens on your own device rather than on a shared server, the practical ceiling is your machine's memory, which comfortably handles inputs far larger than typical online tools allow.
Do I need to sign up or install anything?
No. The tool works in any modern browser on desktop, tablet or phone. There is no account to create, no extension to add and no software to install.
How do I use the result?
The output panel has a one-click copy button, and you can keep refining the input while you work; the result updates in place as you type.
Related tools
All Number Tools →Calculate a Running Difference
Calculate a cumulative difference of a list of numbers.
Calculate a Running Product
Calculate a cumulative product of a list of numbers.
Calculate Number Sum
Quickly add up all the numbers in the given list and find their sum.
Calculate Digit Sum
Quickly add up all the digits of the given numbers.