We present a grating model of two-dimensional (2D) rigorous coupled wave analysis (RCWA) to study top diffraction gratings on light-emitting diodes (LEDs). We compare the integrated-transmission of the non-grating, rectangular-grating, and triangular-grating cases for the same grating period of 6 μm, and show that the triangular grating has the best performance. For the triangular grating with 6-μm period, the LED achieves the highest light transmission at 6-μm grating bottom width and 2.9-μm grating depth. Compared with the non-grating case, the optimized light transmission improvement is about 74.6%. The simulation agrees with the experimental data of the thin polymer grating encapsulated flip-chip (FC) GaN-based LEDs for the light extraction improvement.