Convolution Calculator - Convolve Any Two Sequences

Use this free convolution calculator to convolve any two finite sequences. Get the linear convolution of length m+n-1 with a step-by-step worked term.

Updated: June 16, 2026 • Free Tool

Convolution Calculator

First input sequence. Use commas, spaces, or both. Decimals and negatives are allowed.

Second input sequence. Sequences can be of different lengths.

Results

Convolved Sequence (a * b)
0
Result Length 0
Worked Term 0

What Is Convolution Calculator?

A convolution calculator is a discrete math tool that takes two finite sequences of real numbers and returns a third sequence, where each output term is the sum of products of overlapping pairs of the two inputs. It performs the same operation that signal processing textbooks use to combine a system impulse response with an input signal, and that polynomial algebra uses to multiply two coefficient vectors. By entering Sequence A and Sequence B as comma- or space-separated lists, you get the full linear convolution of length m + n - 1 in a single step.

  • Combine Two Discrete Signals: Compute the output of a linear time-invariant system by convolving an input signal with the system impulse response, ready for plots or further analysis.
  • Multiply Two Polynomials by Coefficients: Treat the coefficients of two polynomials as sequences and read off the product polynomial coefficients without writing out the long multiplication by hand.
  • Smooth a Time Series With a Window: Convolve a noisy series with a uniform or triangular window to average neighbouring values and recover a smoother trend.
  • Cross-Check a Hand Calculation: Verify a small discrete convolution from a textbook or homework problem in a few seconds by entering the two sequences side by side.

Most users reach for a convolution calculator whenever they need the full output of (a * b) without writing the slide-and-multiply step on paper. It is also useful as a sanity check before implementing the same operation in code, because the formula is short but easy to mis-index by one.

To understand why each output term is a sum of pairwise products, the dot product calculator shows the basic two-sequence sum-of-products operation that the convolution formula applies at every output index.

How Convolution Calculator Works

The convolution calculation slides Sequence B across Sequence A and, for each position, sums the products of overlapping pairs. The result has length m + n - 1, where m and n are the lengths of A and B.

(a * b)[k] = sum_{i=0}^{m-1} a[i] * b[k - i], for k = 0, 1, ..., m + n - 2, with b[j] = 0 outside [0, n - 1]
  • Sequence A (a): First input sequence of length m. Each term a[i] is a real number; decimals and negatives are allowed.
  • Sequence B (b): Second input sequence of length n. The convolution treats any index outside [0, n - 1] as zero.
  • Output index k: Position in the convolved sequence, ranging from 0 to m + n - 2. Each k corresponds to one slide of B across A.
  • Result term c[k]: The k-th element of the convolved sequence, defined as the sum of a[i] times b[k - i] over every i for which both indices are valid.

According to Omni Calculator, the convolution of two discrete sequences a and b of length m and n is a sequence of length m + n - 1 in which the k-th element equals the sum of a[i] times b[k - i] over all i where both terms are valid. The same operation shows up whenever a linear system is excited by a finite input, so the worked term above is also the impulse-response view of the same result.

Worked Example: A = [1, 2, 3] convolved with B = [0, 1, 0.5]

Sequence A = [1, 2, 3] (m = 3), Sequence B = [0, 1, 0.5] (n = 3).

Output length = 3 + 3 - 1 = 5. c[0] = 1·0 = 0 c[1] = 1·1 + 2·0 = 1 c[2] = 1·0.5 + 2·1 + 3·0 = 2.5 c[3] = 2·0.5 + 3·1 = 4 c[4] = 3·0.5 = 1.5

Convolved Sequence = [0, 1, 2.5, 4, 1.5], Result Length = 5.

Each output term is the dot product of Sequence A with a reversed, shifted copy of Sequence B, which is exactly the sum the formula prescribes.

According to Wikipedia - Convolution (Discrete convolution), the discrete convolution of two finite sequences of length m and n yields a sequence of length m + n - 1, and the same sum can be obtained by multiplying the polynomials whose coefficients are the two sequences.

According to The Scientist and Engineer's Guide to Digital Signal Processing (Steven W. Smith), the linear convolution of two discrete signals is computed by sliding one signal past the other and summing the products of overlapping samples for each output index.

Because convolution between coefficient vectors is exactly polynomial multiplication, the polynomial division calculator is the natural companion when you also need to divide the resulting product polynomial by a third polynomial.

Key Concepts Explained

Four ideas drive the discrete convolution formula, and understanding them makes every output term easier to interpret:

Linear Time-Invariant Systems

In a linear time-invariant system, the output is the convolution of the input with the impulse response, which is why the operation shows up so often in signal processing and control theory.

Convolution vs. Cross-Correlation

Convolution reverses one of the sequences before sliding, while cross-correlation slides both sequences in the same direction. They produce the same result only when one of the sequences is symmetric.

Zero-Padding the Shorter Sequence

Any index of B that falls outside its valid range is treated as zero, so the slide naturally tapers at the start and end and gives the full m + n - 1 output length.

Equivalence With Polynomial Multiplication

Treating the sequences as coefficient vectors, the convolution produces exactly the coefficients of the product polynomial, so the calculator doubles as a polynomial multiplier.

Keeping these four ideas in mind prevents the most common pitfalls: indexing B in the wrong direction, treating cross-correlation as convolution, and forgetting that zero-padding at the edges is the rule rather than an error.

Since the convolution result is a polynomial in its own right, the add and subtract polynomials calculator is a useful follow-up tool when you need to add or subtract two convolved polynomials to combine separate systems.

How to Use This Calculator

Follow these five steps to convolve two sequences with the calculator:

  1. 1 Enter Sequence A: Type the first sequence as a comma- or space-separated list, for example 1, 2, 3. Decimals and negatives are fine; the calculator ignores blank tokens.
  2. 2 Enter Sequence B: Type the second sequence in the same format. The two sequences can have different lengths, including length 1.
  3. 3 Read the Result Sequence: The primary output is the convolved sequence formatted as a bracketed list, with each term rounded to six significant digits.
  4. 4 Check the Result Length: Confirm the length equals len(A) + len(B) - 1; this is the standard rule for the linear convolution of two finite sequences.
  5. 5 Inspect the Worked Term: Use the worked term to see the exact a[i]·b[j] products that go into one middle output index, which is a fast way to spot indexing mistakes.

For example, with A = [1, 2, 3] and B = [0, 1, 0.5], the calculator returns the sequence [0, 1, 2.5, 4, 1.5] of length 5 and shows that c[2] = 1·0.5 + 2·1 + 3·0 = 2.5.

When the input sequence comes from a parametric rule such as a linear or exponential series, the arithmetic sequence calculator can generate the same list of samples so the convolution starts from a clearly stated source.

Benefits of Using This Calculator

Using a dedicated convolution calculator gives you several practical benefits over doing the slide-and-multiply by hand:

  • Removes Indexing Mistakes: The calculator applies the m + n - 1 slide automatically, so you no longer have to track which output index you are on while multiplying overlapping pairs.
  • Handles Any Real Numbers: Decimal and negative values are accepted as input and preserved in the output, which is useful for impulse responses and signed time series.
  • Doubles as a Polynomial Multiplier: Enter the coefficients of two polynomials to read off the coefficients of the product polynomial, including the correct length without trailing-zero bookkeeping.
  • Shows the Worked Term: The detailed worked term makes the calculation auditable, so you can match every a[i]·b[j] product against a textbook or a class note.

Most users find the calculator saves the most time on sequences of length four or more, where hand calculation is slow and a one-off error is easy to make.

Because convolving a noisy series with a uniform window produces a moving average at every output index, the weighted average calculator is a natural follow-up if you want to check the central tendency of the smoothed series without recomputing the full convolution.

Factors That Affect Your Results

A few practical factors change what you should enter and what to do with the result:

Sequence Lengths

The output always has len(A) + len(B) - 1 terms, so doubling the length of either input adds terms at both edges of the result.

Zero Entries in Either Sequence

A zero entry in A or B removes the corresponding products from the sum, which is how you encode holes or missing samples in a signal.

Polarity and Sign of the Samples

Negative and positive values are summed with their natural sign, so a signed impulse response or a bipolar time series will produce terms that cross zero.

Choice of Worked Term

The calculator highlights one middle index, which has the most overlapping pairs; the first and last output terms each have only one product.

  • The calculator performs linear (full) convolution only, not circular convolution; in MATLAB the conv function already returns this same linear result, while circular convolution of length N requires the separate cconv(a, b, N) call.
  • Very long sequences produce a long result without a visualisation, so for sequences of length greater than 12 the output is best checked against a script rather than read term by term.

According to Wikipedia, the discrete convolution of two finite sequences of length m and n yields a sequence of length m + n - 1, and the same sum can be obtained by multiplying the polynomials whose coefficients are the two sequences. In practice that means the length check alone is a strong cross-validation of the result.

According to Omni Calculator - Convolution, the convolution of two discrete sequences a and b of length m and n is a sequence of length m + n - 1 in which the k-th element equals the sum of a[i] times b[k - i] over all i where both terms are valid.

If the convolved sequence represents a discrete energy profile, the vector magnitude calculator computes its L2 norm so you can compare the energy of the convolution result against the energy of the original input sequences.

Convolution calculator featured image showing two sequences being convolved step by step into a longer output sequence
Convolution calculator featured image showing two sequences being convolved step by step into a longer output sequence

Frequently Asked Questions

Q: What is convolution in simple terms?

A: Convolution slides one sequence past another and, at each position, sums the products of the overlapping terms. The output is a new sequence of length len(A) + len(B) - 1, and every term is a weighted sum of the original samples.

Q: How do you compute the discrete convolution of two sequences?

A: For each output index k from 0 to m + n - 2, add up a[i] multiplied by b[k - i] for every i where both indices are valid. Indices outside the range of B are treated as zero, which tapers the result at the start and end.

Q: What is the length of the convolution result?

A: The linear convolution of two finite sequences of length m and n produces a sequence of length m + n - 1. So two sequences of length 3 give 5 output terms, and two sequences of length 4 give 7 output terms.

Q: Is convolution the same as polynomial multiplication?

A: Yes, when the sequences are read as the coefficients of two polynomials, the convolution produces the coefficients of the product polynomial. That is why convolution is so useful for symbolic algebra as well as signal processing.

Q: What is the difference between convolution and cross-correlation?

A: Convolution reverses one of the sequences before sliding, while cross-correlation slides both sequences in the same direction. The two operations agree only when one sequence is symmetric, such as a uniform window.

Q: Can the convolution calculator handle negative numbers and decimals?

A: Yes, the calculator accepts any real numbers, including negatives, decimals, and a mix of both. Each output term is computed with the same sign rules and rounded to six significant digits for readability.