The wind turbine’s output power is heavily affected by the arrangement of the wind turbine location. Wind farm planning endeavors to firstly maximize the farm’s output energy. Secondly, it seeks to minimize the effects of the wake phenomenon. This paper attempts to find the best possible location of a wind turbine inside a square farm using the particle swarm optimization (PSO) method whilst focusing on the three salient cases: the steadiness of wind direction and speed, the variability of the flow direction with a steady speed, and the variability of direction for three discrete wind speeds. The proposed algorithm generated results that will be contrasted to previous studies on the same topic with different metaheuristic methods such as a genetic algorithm. When compared to the optimum findings from prior research, the suggested approach has a reduced cost. It is developed by language C through MATLAB environment considering a square with the dimensions 2×2 kilometers.