The direct current optimal power flow(DCOPF) is a maturity method for calculating locational marginal price(LMP). It performs the simplified computation of the electric power system, so the optimum results obtained do not accord with the real status of power system. But the method of adopting alternating current optimal power flow(ACOPF) to calculate LMP is not widely used for engineering application. So the AC-DC iterative method is proposed to calculate LMP with losses. In this method, DCOPF model is adopted to complete economic dispatching, and AC power flow model is adopted to calculate the precise power flow and power losses. Both processes iterate alternatively till the method is converged, then the transpose Jacobian matrix is adopted to calculate penalty factors. LMP with losses is deduced according with LMP without losses obtained by DCOPF and the penalty factors. The feasibility of the proposed method is proved by IEEE 14 bus and IEEE 118 bus system, with the effect of the slack bus on LMP analyzed. The calculation results indicate that the proposed method has appreciable economical significance and physical meanings, and is simple for engineering application.