An electrically tunable grating coupler is designed and numerically demonstrated. With a lateral p-i-n diode embedded, the optical spectrum of coupling efficiency can be tuned with the applied voltage. To simulate the coupling spectra response with bias voltage, the optical simulation and electrical simulation are carried out with the commercial software Lumerical Finite-Difference Time-Domain Solutions and Synopsys Sentaurus TCAD. Due to the dual effect of spectrum shift and optical loss, the coupling efficiency spectrum can be greatly modulated. With a bias voltage of 2 V, the resulting spectrum shift is 47.5 nm and the peak coupling efficiency at the designed wavelength center can be modulated from 52% to 10%. In addition, the electrical tuning can be used for compensation of postassembly spectrum shift. The effects of the incident angle error and epoxy curing process are discussed. According to our simulation results, tuning voltages of 1 and 2 V are enough to compensate for the incident angle error of 2.5 deg and 3.5 deg, respectively. For the spectrum shift caused by epoxy bonding, the required tuning voltage is as low as 0.82 V. Though it brings additional optical loss, the tuning technique shows interesting prospects in postassembly coupling optimization or channel equalization.