Enter the value of up to 5 pairs of numbers to calculate the sum product of those numbers.

Sum Product Calculator

Sum Product
Find Two Numbers

Enter the values for each pair to calculate the sum product

Sum-Product Formula

The following formula is used to calculate the sum product of an array of number pairs.

SP = X*Y + W*Z + A*B + C*D + E*F
  • Where SP is the sum product
  • X, Y, W, Z, A, B, C, D, E, F are paired values from two arrays
sum product table showing paired array values

What Is a Sum Product?

A sum product is the result of multiplying corresponding elements from two equal-length arrays and summing all those products. For arrays A = [a1, a2, ..., an] and B = [b1, b2, ..., bn], the result equals a1*b1 + a2*b2 + ... + an*bn. This operation is mathematically identical to the dot product (inner product) of two vectors, placing it at the foundation of linear algebra, statistics, signal processing, and machine learning.

The operation appears under different names across fields. In physics, work equals force dot displacement, a sum product of force and displacement components. In statistics, covariance between two variables is the average sum product of their deviations from their respective means. In machine learning, the pre-activation output of every artificial neuron is z = w1*x1 + w2*x2 + ... + wn*xn, a sum product of weights and inputs. Modern GPU architectures are optimized primarily around this single operation, which is why neural network training scales as well as it does on parallel hardware.

Real-World Applications

Weighted Average Cost of Capital (WACC): A company with 60% equity at an 8% cost and 40% debt at a 5% after-tax cost has WACC = (0.60 * 0.08) + (0.40 * 0.05) = 0.048 + 0.020 = 6.8%. This blended rate is used to discount future cash flows in valuation models. Every DCF model ever built at an investment bank or private equity firm is grounded in a sum product at the WACC step.

Weighted GPA: A student earning a B (3.0) in a 4-credit course, an A (4.0) in a 3-credit course, and a C (2.0) in a 2-credit course has GPA = (3.0*4 + 4.0*3 + 2.0*2) / (4+3+2) = 28/9 = 3.11. A simple unweighted average of the three letter grades would give 3.0, understating the effect of the high-credit A. The sum product in the numerator corrects for this distortion.

Portfolio Expected Return: An investor with 40% in equities returning 10%, 35% in bonds returning 4%, and 25% in real estate returning 7% expects: (0.40*0.10) + (0.35*0.04) + (0.25*0.07) = 0.040 + 0.014 + 0.018 = 7.2% annual return. This is the CFA curriculum standard approach for multi-asset return estimation and appears in every portfolio optimization framework.

Inventory Weighted Average Cost: A company purchased 100 units at $12, 200 units at $15, and 150 units at $18. Weighted average unit cost = (100*12 + 200*15 + 150*18) / 450 = 6,900 / 450 = $15.33. This method is required under IFRS and US GAAP for certain inventory categories and prevents distortions from treating all units as equal regardless of when they were purchased.

Covariance in Statistics: The sample covariance between two return series X and Y is the average sum product of their mean-centered values: Cov(X,Y) = (1/n) * sum of [(Xi - X_mean) * (Yi - Y_mean)]. A positive covariance means the series tend to move together; negative means they diverge. Correlation is just covariance scaled by the product of the two standard deviations, making the sum product step the computational core of correlation as well.

SUMPRODUCT in Excel: Function and Performance

Excel's SUMPRODUCT function uses the syntax =SUMPRODUCT(array1, array2, ...). When passed a single array it returns the sum of all elements; when passed multiple equal-dimension arrays it multiplies element-by-element and sums the results. Because it accepts Boolean arrays (TRUE/FALSE coerced to 1/0), it enables conditional summing without requiring Ctrl+Shift+Enter array entry, which made it a workhorse formula before Excel 365 dynamic arrays arrived in 2019.

Performance benchmark: Independent testing shows 500 SUMPRODUCT formulas take approximately 13.2 seconds to calculate in Excel, roughly five times slower than equivalent SUMIFS formulas on the same dataset. The gap exists because SUMPRODUCT creates temporary in-memory arrays for each calculation cycle, while SUMIFS accesses ranges directly. Use SUMIFS for straightforward conditional summing on large datasets. Use SUMPRODUCT when criteria require transformation inside the formula, such as MONTH(A1:A10)=5 or conditions that SUMIFS cannot express as direct comparisons.

The Inverse Problem: Finding Two Numbers from Their Sum and Product

Given the sum (s = x + y) and product (p = x * y) of two numbers, those numbers are the roots of the quadratic t^2 - s*t + p = 0. By the quadratic formula: x, y = (s +/- sqrt(s^2 - 4p)) / 2. Real solutions exist only when the discriminant s^2 - 4p is at least zero. When the discriminant equals zero exactly, both numbers are identical at s/2. When it is negative, no real pair of numbers satisfies the given sum and product simultaneously, which is what the calculator reports as "No real numbers satisfy these values."

This result appears directly in Vieta's formulas from the 16th century: for any monic quadratic x^2 + bx + c = 0 with roots r1 and r2, the sum of roots equals -b and the product of roots equals c. Knowing any two of the three quantities (sum, product, individual roots) determines the third. The "Find Two Numbers" tab in the calculator is the exact mathematical inverse of computing a two-pair sum product.

FAQ

What is a sum product?

A sum product is the result of multiplying corresponding elements from two equal-length arrays and adding all those products together. For pairs (3, 4) and (5, 2), the sum product is (3*4) + (5*2) = 22. The operation is identical to the dot product of two vectors in linear algebra.

What is the difference between a sum product and a dot product?

There is no mathematical difference. Both compute the sum of element-wise products of two arrays. Dot product is the standard term in physics and linear algebra. Sum product is preferred in spreadsheet and business analytics contexts, particularly with Excel's SUMPRODUCT function. Both return a single scalar value.

When does the inverse sum-product problem have no real solution?

Given a target sum s and product p, two real numbers exist only when s^2 is greater than or equal to 4p. This is the discriminant condition from the quadratic formula. If s = 2 and p = 5, the discriminant is 4 - 20 = -16, which is negative, so no real pair of numbers adds to 2 and multiplies to 5. Such a pair exists only in complex numbers.

Is SUMPRODUCT or SUMIFS faster in Excel?

SUMIFS is approximately five times faster than SUMPRODUCT for equivalent conditional sums. Benchmarks show 500 SUMPRODUCT formulas take about 13.2 seconds versus roughly 2-3 seconds for SUMIFS on the same data. SUMPRODUCT remains useful when criteria require in-formula calculation such as date functions or array transformations that SUMIFS cannot handle directly.

How does sum product apply to WACC?

WACC is a direct sum product application. Each capital component contributes a product of its weight and its cost: WACC = (equity weight * cost of equity) + (debt weight * after-tax cost of debt) + (preferred weight * cost of preferred). Summing these pairwise products gives the blended financing rate used to discount a company's future cash flows in DCF valuation.

sum product calculator