The effect of In surface segregation and diffusion on the transition energy of an InGaAs/GaAs strained quantum well (QW) was investigated theoretically. Diffusion equations and the Schrödinger equation on the InGaAs/GaAs QW were solved numerically. The energy shifts under different diffusion lengths were simulated. When the width of QW, L, is larger than 5 nm, the change rate of the transition energy is very minimal at the initial stage of the annealing process for wide QW, and the transition energy has a rapid blue shift with an increase of the diffusion length. When L is smaller than 5 nm, the transition energy is very sensitive to the diffusion length. The change rate of transition energy increases with a decrease in QW width.