The capacity of mobile ad hoc network (MANET) is typically determined by the size of network, routing protocol, mobility and the interactions that occur between the nodes. Moreover, these critical parameters cause the loss rate that has severed impact on the performance of the MANET. This situation even becomes worst when these critical parameters are chosen inappropriately. This paper presents an analytical model that incorporates most of the critical parameters that can influence the capacity of MANET. Based on the analytical model, an efficient 3-phase algorithm is designed to optimize the performance of MANET in terms of an increased capacity and the reduced transmission delay. The proposed 3-pahse algorithm considers both delay-tolerant and delay-sensitive network traffics. In addition, the 3-phase algorithm can be used to approximate both the best and worst case capacities of MANET with the relaying and non-relaying nodes.