The main objective of this paper is to propose an automatic tool for the planning problem of Long Term Evolution (LTE) networks. More precisely, a new mathematical model is proposed to solve the planning problem of the Evolved Packet Core (EPC) of LTE networks while minimizing costs. Given the location of the eNodeBs and the traffic demand, our model simultaneously determines the optimal number, the optimal location and the optimal type of all core network elements (i.e. MME, S-GW, P-GW, HSS and PCRF) as well as the interconnection among these elements. Simulation results show that the proposed mathematical model can be solved optimally for small size problems using CPLEX but faces the time limit when problem sizes get closer to real-size instances.