This paper discusses an improvement in network planning for wireless mesh networks (WMNs) using a modified binary particle swarm optimization (MBPSO) algorithm to minimize costs while considering the distances between nodes. The results showed a significant increase in packet delivery ratio (PDR) by approximately 17.83% and a decrease in end-to-end (E2E) delay by about 8.33%, indicating that incorporating distance into cost optimization enhances network performance. The study underscores the importance of balancing cost and signal quality in WMNs for better performance.