We present a stable and efficient electromagnetic analysis for the influence of grating on light extraction in organic light emitting diodes. By this approach, the trend of the output power and mode distribution variance with the change of structure parameters could be predicted before the experiments.