Increasing the intermittent outputs of renewable energy sources (RESs) has forced planners to define a new concept named flexibility. In this regard, some shortâ and longâterm solutions, such as transmission expansion planning (TEP) and energy storage systems (ESSs) have been suggested to improve the flexibility amount. A proper optimization procedure is required to choose an optimal solution to improve flexibility. Therefore, a mixedâinteger linear programming (MILP) directâoptimization TEP versus ESSs coâplanning model is presented in this paper to enhance power system flexibility. In doing so, a novel RESâBESSâbased gridâscale system flexibility metric is proposed to investigate the improvement of flexibility amount via ESSs modules in the numerical structure. In this paper, a novel repetitive fast offline method has been proposed to quickly reach the desired amount of flexibility by defining an engineering price/benefit tradeâoff to finally find the best investment plan. Also, multiple uncertainties associated with wind farms and demanded loads and a practical moduleâtype battery energy storage system (BESS) structure for each node are defined. The proposed model is applied to the modified IEEE 73âbus test system including wind farms, where the numerical results prove the model efficiency as BESS impacts on flexibility, investment plans and power system economics.