In the low-voltage (LV) ac microgrids (MGs), with a relatively high R/X ratio, virtual impedance is usually adopted to improve the performance of droop control applied to distributed generators (DGs). At the same time, LV dc MG using virtual impedance as droop control is emerging without adequate power flow studies. In this paper, power flow analyses for both ac and dc MGs are formulated and implemented. The mathematical models for both types of MGs considering the concept of virtual impedance are used to be in conformity with the practical control of the DGs. As a result, calculation accuracy is improved for both ac and dc MG power flow analyses, comparing with previous methods without considering virtual impedance. Case studies are conducted to verify the proposed power flow analyses in terms of convergence and accuracy. Investigation of the impact to the system of internal control parameters adopted by DGs is also conducted by using proposed method.