How the Kalman filter works

How a simple loop of predicting and correcting turns a stream of noisy measurements into an estimate better than any single reading.

Written by Amili, an AI writer, from the sources listed below · 18 October 2026 · 6 min read


A Kalman filter is an algorithm that estimates a hidden quantity, such as a vehicle's position, by repeatedly predicting where it should be and then correcting that guess with each new noisy measurement, weighting whichever source is more certain. It underpins navigation, guidance and sensor fusion.

In short

  • It alternates between two steps: predict the next state from a model, then update the prediction with a measurement.
  • Each step blends prediction and measurement as a weighted average, giving more weight to whichever is less uncertain.
  • It only needs the latest estimate and its uncertainty, not the full history, so it can run in real time.
  • The Kalman gain controls the trade-off between reacting quickly to new data and smoothing out noise.
  • It is optimal under specific assumptions, chiefly linear dynamics and known noise statistics, and degrades when those fail.

What problem does a Kalman filter solve?


Almost every measurement is a little wrong. A sensor jitters, a model of motion leaves things out, and outside forces nudge a system in ways nobody planned for. The Kalman filter, also known as linear quadratic estimation, is a way to combine a series of imperfect measurements taken over time into an estimate of some unknown quantity that tends to be more accurate than any one reading on its own.

The quantity being tracked is called the state. It might be the position and speed of an aircraft, the orientation of a spacecraft, or a variable in an economic model. The filter never sees the state directly. It only sees noisy evidence about it, plus a model of how the state is supposed to change from one moment to the next.

How does the predict-and-update loop work?


The algorithm runs in two phases that repeat at every time step. In the prediction phase, it uses the system's dynamic model, for example the laws of motion, together with any known control inputs, to project the state forward. It also projects its own uncertainty forward, usually growing it, because predictions get less reliable the further they reach.

In the update phase, a new measurement arrives. The filter compares it with the prediction and forms a weighted average of the two. The weights come from their uncertainties, expressed as covariances: the less uncertain source is trusted more. The result lands somewhere between the prediction and the measurement, and its uncertainty is smaller than that of either input.

That new estimate, with its new uncertainty, becomes the starting point for the next prediction. Because each round depends only on the previous best guess and its uncertainty, the filter is recursive and needs no stored history. This is what lets it run continuously on modest hardware.

What does it look like on a simple example?


Picture a delivery truck that needs to know where it is. It has a GPS unit that is accurate to within a few meters but whose readings jump around. It can also estimate its position by dead reckoning, adding up its speed and direction from the wheels and steering. Dead reckoning is smooth but slowly drifts as tiny errors pile up.

Each cycle, the filter first predicts the truck's new position from its previous one using the motion model, and it widens its uncertainty, perhaps more so at high speed. Then a GPS fix arrives. If the prediction has drifted, the GPS pulls the estimate back toward the truth; if the GPS reading is jumpy, the smooth prediction keeps the estimate from leaping around. Neither source alone is as good as the blend.

The balance is captured by a number called the Kalman gain. A gain near one makes the filter follow the latest measurements closely, which is responsive but jittery. A gain near zero makes it lean on the model, which smooths out noise but reacts slowly. In a standard Kalman filter the gain is computed from the uncertainties rather than set by hand, though engineers can tune the noise assumptions that feed it.

Where is the Kalman filter used?


The filter takes its name from Rudolf E. Kálmán, with related earlier work by Thorvald Nicolai Thiele and Peter Swerling and contributions from Richard S. Bucy. Stanley F. Schmidt is generally credited with the first implementation, after he saw how the ideas applied to estimating trajectories for the Apollo program, where the filter ended up in the navigation computer.

Since then it has become a workhorse for guidance, navigation and control of aircraft, ships and spacecraft, including vehicles that dock at the International Space Station. It is used in robotics, radar, computer vision, signal processing and econometrics, and it is a standard tool for sensor fusion, where readings from several different instruments must be merged into one picture. Researchers have even used it to model how the nervous system controls movement despite delays in sensory feedback.

When does a Kalman filter go wrong?


Its guarantees rest on assumptions. The classic filter assumes the system is linear and that the errors have zero mean. If the noise is Gaussian, it is the optimal estimator; if the noise is not Gaussian but its covariances are known, it is still the best linear estimator, though a nonlinear method might do better. A common misconception holds that it cannot be used at all without Gaussian noise, which is not correct.

The practical risks come from a mismatched model. If the motion equations are wrong, or the assumed noise levels are far from reality, the filter can become overconfident and ignore measurements it should heed, or it can chase noise. For nonlinear systems, variants exist, the extended Kalman filter and the so-called unscented version among them, but they trade away some of the original's clean guarantees.

What does it teach about thinking?


The Kalman filter is a disciplined version of a habit worth having: hold a belief, state how confident you are in it, and when new evidence arrives, move toward it in proportion to how reliable it is compared with what you already thought. Strong evidence shifts the estimate a lot; weak evidence shifts it a little.

It also shows that uncertainty is information. Tracking how unsure an estimate is matters as much as the estimate itself, because it decides how much the next piece of evidence should count.

Questions people ask


Is a Kalman filter a form of Bayesian estimation?

It is closely related. The filter keeps a probability distribution over the hidden state and updates it as measurements arrive, combining a prior prediction with new evidence weighted by uncertainty. Its basis is a hidden Markov model with continuous states and Gaussian variables, and it is built to minimize mean squared error while also connecting to maximum likelihood statistics.

What is the Kalman gain?

The Kalman gain is the weight the filter gives to a new measurement relative to its own prediction. A high gain, close to one, makes the estimate follow measurements closely and react fast, at the cost of jitter. A low gain, close to zero, keeps the estimate near the model's prediction, smoothing noise but responding more slowly to real changes.

Does a Kalman filter work for nonlinear systems?

The original filter is designed for linear systems. For nonlinear ones, extensions are widely used, notably the extended Kalman filter and its unscented cousin. They adapt the predict-and-update idea to curved relationships, which is how the method was applied to trajectory estimation for Apollo, but their performance depends more heavily on the quality of the model.

The thinking behind it


It explains forecasting and Bayesian updating, the same idea of revising an estimate as noisy evidence arrives.

Read or listen to The Signal and the Noise

Hear the whole book free: start an Audible trial and your first audiobook — this one, if you like — is on the house.

As an Amazon Associate, ReadGlobe earns from qualifying purchases and Audible trials — at no extra cost to you.

Sources

How this was made: Amili, an AI writer, wrote this article in its own words from the sources above. Every link was checked before publishing. Spotted an error? Tell us and we will correct it.

More algorithms, explained


Books readers reach for

As an Amazon Associate, ReadGlobe earns from qualifying purchases — at no extra cost to you.