This study describes a zero-dimensional algorithm for tracking the intake dilution in real-time. The inputs to the model are the oxygen concentration from the exhaust oxygen sensor, the manifold air pressure and temperature (MAP/MAT), the mass air flow (MAF) and the estimated fuel injected per cycle from the engine control module. The intake manifold, the exhaust manifold and EGR system are discretized into 3 volumes and the detailed concentrations of the gas species comprising the exhaust, EGR and intake streams are tracked at each time step (on a cycle-by-cycle basis). The model does not need the EGR ratio to be known in advance and is also applicable to oxygenated fuels such as ethanol. The model response is tuned to a multi-cylinder engine and the model output is empirically validated against a wide range of engine operations including load and EGR transients. This research is part of an effort to develop a systematic combustion and emission control strategy for advanced combustion cycles.