Explored in this paper is the grid impedance effect on the stability of a single-phase grid connected inverter with an LC filter based on an analysis of the inverter output impedance. For a single-phase grid connected inverter, a PI controller is often used to regulate the current injected into the grid. However, the control performance can be influenced when the inverter is connected to a weak grid. Also, the utility grid has background harmonic noise, which can make the injected current distorted. Therefore, analysis of the output impedance of a single-phase grid connected inverter is important for the robustness and stability of the system. By modeling the output impedance of inverter, it can be determined that the proportional gain and integral gain of the controller have an effect on the output impedance. Analytical results show that by adjusting the PI controller parameters, the ability for harmonic reduction and stability of the system can be improved. Simulation and experiments using a 1 kW single-phase grid connected inverter verify the effectiveness of the theoretical analysis.