Convolution Calculator
Online discrete convolution calculator for finite sequences: the result y(n) is the convolution of sequences x(n) and h(n). Enter the two data sequences, press Calculate and read the result sequence — everything runs locally in your browser.
Enter the first data sequence
Type the values of x(n) separated by spaces or commas, e.g. 1 1 1 0 0 0. Decimals, negatives (−2) and scientific notation like 1e2 all work.
Enter the second data sequence
Type the values of h(n), e.g. 0.5 0.2 0.3. This is the kernel that slides across the first sequence — order does not matter: convolving x with h gives the same result as h with x.
Press Calculate and read y(n)
The result data sequence appears in the output field, e.g. 1 1 1 0 0 0 convolved with 0.5 0.2 0.3 gives 0.5 0.7 1 0.5 0.3 0 0 0. Press Reset to restore the example and start over.
How convolution works here
- What is the convolution formula?
- For finite sequences x(n) and h(n) the discrete convolution is y(n) = Σₖ x(n−k)·h(k): each output value is the sum of the kernel values multiplied by the overlapping samples of the first sequence as it slides across. For x(n) with N values and h(n) with H values the index runs n = 0 .. N + H − 2.
- How long is the result sequence?
- The convolution of an N-value sequence and an H-value sequence has N + H − 1 values. Convolving 1 2 3 (N = 3) with 0 1 0.5 (H = 3) gives 5 values: 0 1 2.5 4 1.5. Trailing zeros of the default example are part of the result and are kept.
- Can you show a worked example?
- Yes: [1, 2, 3] ∗ [0, 1, 0.5] → y(0) = 1·0 = 0; y(1) = 1·1 + 2·0 = 1; y(2) = 1·0.5 + 2·1 + 3·0 = 2.5; y(3) = 2·0.5 + 3·1 = 4; y(4) = 3·0.5 = 1.5, so the result is 0 1 2.5 4 1.5.
- Which separators and number formats are accepted?
- Values are separated by spaces or commas (extra spaces are ignored). Decimals, negative numbers and scientific notation such as 1e2 are accepted; a single value like 1 acts as the identity kernel — convolving with it returns the other sequence unchanged.
- What if a sequence is empty or contains a non-number?
- The calculator shows an in-app error naming the invalid value, and any previous result is cleared so a stale sequence can never be mistaken for the answer to your latest input.
Privacy: every convolution is computed in your browser tab — no value you type is sent anywhere. Results use IEEE-754 double-precision arithmetic, identical to evaluating the sum with a JavaScript expression.