Type to search, in English or Thai

  1. Home
  2. Tools
  3. Convolution calculator

// Tools · Convolution Calculator

Discrete Convolution Calculator: Multiplication Table, Exact Fractions and Plots

Enter two sequences x[n] and h[n]. The tool computes y[n] = x[n] * h[n] with exact fractions, shows the multiplication table summed along its diagonals, gives the start index and length of the result, writes it as a product of polynomials in z−1z^{-1}, and draws stem plots of all three signals. Use it to check signals-and-systems homework, FIR filters and polynomial products.

By Ajarn ModUpdated

Calculator

How to use it

  1. Type the values of x[n] separated by commas and set the index of the first value.
  2. Do the same for h[n]. Fractions such as 1/3 and decimals such as -0.25 are fine.
  3. Press Compute, or try a preset (moving average, first difference, polynomial product, time shift). The page URL keeps your inputs so you can share the result.

Formula and rules

y[n]=∑k=−∞∞x[k] h[n−k]y[n] = \sum_{k=-\infty}^{\infty} x[k]\,h[n - k]
  • If x has N values starting at nxn_x and h has M values starting at nhn_h, the result has N + M − 1 values starting at nx+nhn_x + n_h.
  • Convolution commutes, x∗h=h∗xx * h = h * x, and x∗δ[n−k]=x[n−k]x * \delta[n - k] = x[n - k] (a time shift).
  • The sum of y equals the sum of x times the sum of h, a quick check on any answer.

Worked example

{1,2,3}∗{1,1}\{1, 2, 3\} * \{1, 1\}, both starting at n = 0. The first row of the table is 1, 2, 3; the second row is 1, 2, 3 shifted one place. Adding along the diagonals gives

y={1,3,5,3}y = \{1, 3, 5, 3\} · sum 12 = 6 × 2 · the same as (1+2x+3x2)(1+x)=1+3x+5x2+3x3(1 + 2x + 3x^2)(1 + x) = 1 + 3x + 5x^2 + 3x^3

The system h={1,1}h = \{1, 1\} adds each sample to the previous one. Its frequency response is 1+e−jΩ=2e−jΩ/2cos⁡Ω21 + e^{-j\Omega} = 2e^{-j\Omega/2}\cos\tfrac\Omega2 (Euler's formula, factoring out half the angle), so its magnitude 2∣cos⁡Ω2∣2|\cos\tfrac\Omega2| makes it a low-pass filter.

Frequently asked questions

How is discrete convolution computed?

y[n] = Σ x[k]h[n − k]. The quickest hand method is a multiplication table: x across the top, h down the side, multiply every cell and add along the diagonals. The result starts at the start of x plus the start of h and has N + M − 1 values.

Can I enter fractions or negative values?

Yes. Type 1/3, -2, 0.25 separated by commas. The tool works with exact fractions throughout, gives the answer in lowest terms, then re-checks it in floating point.

What if a sequence does not start at n = 0?

Set the starting index of its first value. For h[−1] = 1, h[0] = 3, enter 1, 3 and start at −1. The result marks n = 0 with an arrow.

How is convolution related to polynomial multiplication?

They are the same operation. Read each sequence as the coefficients of a polynomial in z⁻¹; the convolution is the coefficient list of the product. That is why the z-transform turns convolution into multiplication.

What is a quick check on a convolution?

The sum of y equals the sum of x times the sum of h. For example {1, 2, 3} * {1, 1} = {1, 3, 5, 3}: 12 = 6 × 2.

More tools