In this paper, we investigate the lifetime optimization for wireless multihop networks with network coding. We formulate the problems for three different cases with (i) no network coding, (ii) two-way network coding, and (iii) overhearing network coding. These problems are solved using interior-point method and the lifetime in all these cases are evaluated in random topologies with respect to power control models, the number of flows, traffic demand distributions and initial energy of each node. Numerical results show following observations: (1) With weak power control, network coding can achieve better lifetime gain; (2) Both lifetime gain and computation overhead of network coding increase with the number of flows; (3) The impact of traffic demand distributions and initial energy on the lifetime performance is negligible; (4) The overhearing network coding, although having higher computation overhead, does not perform significantly better than much simpler two-way network coding.