Two-Variable Function Calculator (Combine Two Columns)
Apply a two-variable operation such as sum, difference, product, quotient, power, Euclidean distance, or average to two columns of numbers (x and y) at once, and view each row's result plus the total and average in a table.
Input
Choose the two-variable operation applied to each row of column x and column y.
Separate values with line breaks, commas, or spaces. Column x and column y must have the same number of entries. Non-numeric tokens are removed automatically.
Result
Sum of the result column
67
x + y (sum) applied to 5 rows
Data rows
5 rows
Result total
67
Result average
13.4
Per-row results
Valid 5 / 5 rows
| Row | x | y | Result |
|---|---|---|---|
| 1 | 3 | 4 | 7 |
| 2 | 5 | 12 | 17 |
| 3 | 8 | 6 | 14 |
| 4 | 10 | 10 | 20 |
| 5 | 2 | 7 | 9 |
How it works
- Enter the same number of values into column x and column y, and the chosen operation (sum, difference, product, quotient, power, Euclidean distance, or average) is applied to every row to build a new result column.
- Input accepts line breaks, commas, or spaces as separators, and tokens that cannot be read as numbers are removed automatically. You can paste a single column straight from a spreadsheet.
- Rows where x÷y has y equal to 0, or where the result becomes infinite or not-a-number, are shown as "—" and excluded from the total and average (the excluded count appears in the results panel).
- √(x²+y²) is the Euclidean distance (the hypotenuse of a right triangle), representing the magnitude when x and y are treated as quantities in two perpendicular directions.
- The total and average cover only the rows that were computed successfully. Values are rounded to six decimal places for readability, but the internal calculation is performed without rounding.
- If column x and column y have different counts, no calculation is performed and each count is shown so you can check for unpaired rows.
Related calculators
Flash Shooting Distance
HobbyCalculate the ideal shooting distance to your subject from a flash unit's guide number, aperture and ISO.
Open calculator →Flash Aperture Calculator
HobbyCalculate the correct f-stop for flash photography from guide number, distance, and ISO. Instantly see the nearest standard f-stop and the correct distance for each aperture.
Open calculator →Lens Focal Length Calculator
HobbyEstimate the lens focal length (mm) and 35mm equivalent you need from your subject distance, real size, and sensor width.
Open calculator →Camera Angle of View Calculator
HobbyEnter a lens focal length and image sensor size to instantly calculate how wide a scene the camera captures: the horizontal, vertical, and diagonal angle of view. Includes presets for full frame, APS-C, Micro Four Thirds and more (plus custom sensor sizes) and shows the 35mm equivalent focal length too.
Open calculator →