We present a novel approach called the intermediate rotating wave approximation (IRWA), which employs a time-averaging method to encapsulate the dynamics of light-matter interaction from strong to ultrastrong coupling regime. In contrast to the ordinary rotating wave approximation, this method addresses the co-rotating and counter-rotating terms separately to trace their physical consequences individually, and thus establishes the continuity between the Jaynes-Cummings model and the quantum Rabi model. We investigate IRWA in near resonance and large detuning cases. Our IRWA not only agrees well with both models in their respective coupling strengths, but also offers a good explanation for their differences.