Convolution Calculator
With convolution calculator, you can quickly compute the result of convolving two sequences of data. Not yet familiar with this math operation? Scroll down to learn with us! We'll answer the following questions:
- What is convolution?
- How to calculate convolution?
- What is the role of convolution in probability theory?
We'll also go together through an example of computing the convolution of two data sets.
🙋 Convolution is a specific method of multiplying two sequences of numbers. If you're looking for the more standard method, visit dot product calculator.
What is convolution in math?
Convolution is a mathematical operation on two sequences (or, more generally, on two functions) that produces a third sequence (or function). Traditionally, we denote the convolution by the star ∗, and so convolving sequences a and b is denoted as a∗b. The result of this operation is called the convolution as well.
The applications of convolution range from pure math (e.g., probability theory and differential equations) through statistics to down-to-earth applications like acoustics, geophysics, signal processing, and computer vision.
💡 In signal processing, if you know the impulse response of a linear time-invariant system (e.g., an amplifier), then using convolution, you can predict the system's output for any input.
Let's discuss how we define convolution.
Formula for convolution of sequences
Consider the two sequences a={an}n=0∞a={an}n=0∞ and b={bn}n=0∞b={bn}n=0∞. The use of ∞∞ here simply means that their lengths can be arbitrarily long. Note that we start counting the sequences' terms at 00, like programmers do. We define the convolution of aa and bb as the sequence c={cn}n=0∞c={cn}n=0∞, where
The convolution formula above may look intimidating at first, but it is actually really simple! Explicitly, for the first few terms, we have:
See the pattern? To get cncn (the nn-th term of the convolution), we compute the products of terms whose indices sum to nn. Consider c2c2 — for this term, we need the products of terms whose indices sum to 22. These are a0b2a0b2, a1b1a1b1, and a2b0a2b0, because 0+2=1+1=2+0=20+2=1+1=2+0=2! Clever, isn't it?
🔎 If you're already familiar with series, the formula above looks familiar — it is the Cauchy product of series. See the sum of series calculator to learn about this area of math.
As we now know what convolution is and what formula has to be used, let's see how to calculate the convolution of two data sets with the help of our tool.
How to use the convolution calculator
Using this convolution calculator is really simple:
- Input the data up to fifteen terms per sequence — additional fields will appear as you go.
- The calculator will summarize your input at the bottom of the calculator. Make sure there's no typos.
- The result of the convolution will appear at the same place.
Example
Let's go together through an example. We will compute the convolution of [1, 2, 3] with [4, 5, 6]. Let's first compute by hand, using the convolution formula we've discussed in the previous section:
- c0 = 1 × 4 = 4
- c1 = 1 × 5 + 2 × 4 = 13
- c2 = 1 × 6 + 2 × 5 + 3 × 4 = 28
- c3 = 2 × 6 + 3 × 5 = 27
- c4 = 3 × 6 = 18
Entering these values into convolution calc, we see that our calculations are correct. Great!
Convolution of functions
The convolution of two sequences that we discussed above is, in fact, a special case of a more general math operation: convolving two functions.
Namely, for two real functions ff and gg, their convolution f∗gf∗g is another function, whose value at xx is defined as
From the point of view of signal processing, ff describes the signal and gg is a filter applied to this signal. The role of the filter may be, e.g., to sharpen or blur the signal, depending on our needs.
How to visualize convolution
The integral formula for convolving two functions promotes the geometric interpretation of the convolution, which is a bit less conspicuous when one looks at the discrete version alone.
First, note that by using −t−t under the function gg, we reflect it across the vertical axis. Then, by introducing the time-offset xx, we slide gg horizontally.
Now, for a fixed value of xx, we integrate the product of f(t)f(t) and g(x−t)g(x−t), that is, we compute the area under the function f(t)f(t) but weighted by the function g(x−t)g(x−t), i.e., by g(−t)g(−t) shifted by xx. And as the value of xx changes (let's say it increases), i.e., as g(−t)g(−t) slides horizontally (from left to right), different parts of the signal f(t)f(t) get emphasized by the weighting.
In the picture below, you can see how this procedure works in the particular case of both ff and gg as the characteristic functions of the interval [−21,21][−21,21], or more visually intuitive, as single periods of square waves. Let us point out that here, the weighting is trivial (constant), so the value of convolution for the argument xx is exactly equal to the yellow area at time xx. Look carefully how the value of the convolution (black line) increases from zero (before the two functions touch) to the maximal value (when they coincide) and then decreases again, hitting zero exactly at the moment of gg bidding its final farewell to ff.

FAQs
- What is convolution in math?
- Convolution is a mathematical operation on two sequences (or, more generally, on two functions) that produces a third sequence (or function). Traditionally, we denote the convolution by the star ∗, and so convolving sequences a and b is denoted as a∗b. The result of this operation is called the convolution as well. The applications of convolution range from pure math (e.g., probability theory and differential equations) through statistics to down-to-earth applications like acoustics, geophysics, signal processing, and computer vision.
- Is convolution commutative?
- Yes, convolution is commutative, meaning that the order does not matter and that f∗g=g∗f. Moreover, it is associative as well as distributive, i.e. f∗(g∗h)=(f∗g)∗h and f∗(g+h)=(f∗g)+(f∗h).
- What is the unit element of convolution?
- The unit element of convolution is the sequence with one at the initial position and zeroes elsewhere: {1, 0, 0, 0,...}. We call it a unit sample sequence, discrete-time impulse, or a (discrete) Dirac delta impulse.
- How do I calculate convolution?
- To compute the convolution of two sequences (vectors): First multiply the first term of each sequence with one another. This is the first term of the convolution. To get the n-th term of the result: Compute the products a0bn, a1bn-1, etc., up to anb0. Note that the indices change simultaneously: the first one increases, while the second one decreases. Add together all the terms computed above. Repeat Step 2 for as many terms as you need. Alternatively, use an online convolution calculator.
- What is the application of convolution in probability?
- The well-known theorem in probability says that if we have two independent random variables with probability density functions (PDFs), then the PDF of their sum arises as the convolution of the PDFs of these variables.
Related calculators
Remainder
Use the remainder calculator to find the quotient and remainder of division.
Math
Slope
Calculate the slope of a line from two given points using the slope calculator. Discover the slope formula and learn how to find a slope with two points.
Math
Average
Calculate the average (mean) with our user-friendly tool. Discover how to find averages or perform quick calculations effortlessly.
Math
Circumference
Use this free circumference calculator to find the area, circumference and diameter of a circle.
Math