Various applications, including space exploration, transportation, factories, and the military, demand the presence of mobile robots. In those applications, navigation algorithms are essential for enabling mobile robots to operate efficiently and safely in static and dynamic environments. Due to the numerous navigation algorithms available, choosing a suitable and robust one for a specific mobile robot application can be challenging. Therefore, there is a pressing need to conduct a comparative analysis to evaluate the performance and adaptability of different navigation algorithms. This article presents a comparative study of five distinct algorithms in the domain of path planning, which are rapidly random tree (RRT), A*, genetic algorithm (GA), ant colony optimization (ACO), and particle swarm optimization (PSO). The investigation was conducted on three distinct maps, and the strengths and weaknesses of each algorithm are demonstrated. Findings show that increasing the step distance and number of iteration parameters will result in an increase in the planning time. Consequently, the obtained path lengths are also reduced except for the PSO algorithm. Findings show that in the three different environments considered in this paper, the GA exhibits better performance, where a 90% reduction in the planning time is achieved while obtaining the same path length as the A* algorithm, which is the shortest path.