CSV Formula Calculator
Use original CSV column references in a bounded scientific formula and append a new approximate numeric result column without uploading your source.
This tool processes its input contents in your browser instead of sending them to a processing service. Page, asset and fixed usage-measurement requests are described on the Privacy page.
Append an approximate numeric result column from one safe scientific formula using original c1, c2 column references.
How to use it
- 1Paste or open CSV and read its displayed column-reference map.
- 2Write a formula, choose angle mode and enter a new output heading.
- 3Calculate every row and download the complete table after all rows pass.
Example
- Input
- item,quantity,unit_price Tea,3,2.5 Coffee,2,4.25
- Output
- item,quantity,unit_price,line_total Tea,3,2.5,7.5 Coffee,2,4.25,8.5
Use formula c2*c3 and output column line_total. The item names remain ordinary text because the formula does not reference c1.
What happens to your data
The bounded interpreter runs in the browser. It has no remote fetch or arbitrary-code facility. Optional usage records and count reports exclude the formula and table values.
Last updated November 2026
Add a calculated CSV column without creating a spreadsheet formula in every row. Write one bounded numeric expression using c1, c2 and other original column numbers. The calculation runs independently for each data record and preserves its original fields beside the new result.
How it works
The displayed reference map associates c1 with the first input field, c2 with the second and so on. Only referenced fields are interpreted as numbers, so an unreferenced product name or long text ID stays intact. For quantity in column 2 and unit price in column 3, c2*c3 calculates a line total. You can use parentheses, arithmetic, powers and supported scientific functions such as sqrt, abs, min, max and trigonometric functions. Choose degrees or radians explicitly. Percent always divides by 100. Power binds before unary minus and associates from right to left.
This reuses Toolvore's fixed scientific-expression interpreter. It never compiles or evaluates JavaScript, fetches a URL or writes another system. Assignment, per-row state, cross-row references and newly appended-column references are unsupported. A formula is limited to 2,000 characters, 512 tokens/nodes, nesting depth 32, 100 function arguments and 50 distinct original column references. At least one data record is required.
Referenced input values must be finite plain decimal or decimal-exponent text of at most 128 characters. Leading/trailing spaces, empty cells and currency are rejected. Values use approximate IEEE 754 binary64 arithmetic. Large integers may round and results such as 0.1+0.2 can contain the corresponding floating-point representation. Use exact sum or running-total tools when their decimal operations fit the task. Results use round-trip numeric text rather than a fixed currency display. A division by zero, unsupported name, non-finite result or other failed row stops the entire export with a location/code.
Choose a new heading with 1–160 UTF-8 bytes, no control characters and no duplicate original heading. It is appended to the table, consuming one of the 128 supported columns. The count report records reference indexes, formula length and angle mode while excluding the formula, source headings and values.
Paste or open UTF-8 CSV up to 500 KiB and choose comma, semicolon or tab explicitly. The first record supplies unique, nonempty column names. Unequal field counts, invalid quoting and invalid Unicode stop parsing. Limits include 10,000 records including the header, 128 columns and 200,000 cells. Complete output is limited to 2 MiB. A result that would exceed a bound fails before a download is offered. CSV output uses UTF-8 without a BOM and CRLF record endings. Quoted line breaks and delimiters stay within their logical cells.
The table preview is bounded and the text preview may be shortened. Copy and download include the complete output. Editing input or settings removes the previous result. File reads are tied to the latest input revision, including after Clear or another file choice. The separate JSON count report omits source values, headings, filenames and expression text. Formula-like CSV cells are counted and retained literally. Spreadsheet software may evaluate those cells or change identifiers when importing. Review the file and import affected columns as text. Browser processing happens in tab memory. Optional usage measurement excludes the source and result values.
Worked example: Add a line total
- Input
- item,quantity,unit_price Tea,3,2.5 Coffee,2,4.25
- Result
- item,quantity,unit_price,line_total Tea,3,2.5,7.5 Coffee,2,4.25,8.5
Use formula c2*c3 and output column line_total. The item names remain ordinary text because the formula does not reference c1.
Common use cases
- Calculate line totals from quantity and unit-price fields.
- Create a reviewed percentage-change field from two numeric columns.
- Apply one square-root or trigonometric calculation to a small numeric export.
- Prepare a derived measurement column before charting or statistics.
Frequently asked questions
Can I use column headings in a formula?+
Use the displayed original column references c1, c2 and so on. This avoids interpreting spaces, punctuation or duplicate variable names from headings.
Does it run JavaScript or spreadsheet code?+
It uses the fixed mathematical grammar of Toolvore's scientific interpreter. It offers numeric expressions and allowlisted functions without arbitrary code execution.
Are monetary calculations exact?+
Formula results are approximate binary64 values. Exact decimal sum and cumulative-sum workspaces are available for their supported operations. No currency rounding is inferred.
What happens if one row divides by zero?+
The whole export stops with the logical record location and error code. A partial result is never offered as a completed calculation.
Related tools
CSV Date Converter
Convert selected CSV dates between explicit numeric formats, validate Gregorian dates and keep empty cells and text identifiers intact.
CSV Fill Missing Values
Fill empty CSV cells in selected columns, keep contiguous groups separate and download the complete table with a source-free count report.
CSV Schema Validator
Validate CSV against an explicit Table Schema subset: exact columns, logical types, required values, bounds, uniqueness and primary keys, without changing cells.
CSV Cell Splitter
Split one CSV column by a literal separator, retain text identifiers and choose rows or numbered columns with reviewed exports.