The influence of variable air-fuel ratio inside a spark ignition engine is examined by the use of an ionization sensor. The measured ion currents are used for predicting the local air-fuel ratio in the vicinity of the spark plug. In order to support the results, a theoretical analysis has been made. An instationary chemical kinetic model burning a mixture of iso-octane and n-heptane is used for the calculations. The results are used to reconstruct the crank angle resolved ion current that has been measured in an engine. This technique has been developed in order to offer a supplementary low-cost facility of controlling the air-fuel ratio within the combustion chamber of an engine.