Wind farm layouts have drawn more and more attention due to their high clean energy capacity. Layout optimization is done to reduce the initial setup costs and future maintenance costs. Wake effect is one of the major factors that leads to energy losses. This paper presents a model for the optimal placement of wind turbines in a given farm area to maximize the output power with a minimum number of turbines. Unlike other algorithms like genetic algorithm (GA) and PSO, the proposed method uses simple distance calculations and sorting algorithms to place the turbines. Also, the proposed method is not confined to a fixed number of turbines but generates the number of turbines that when placed give the maximum power output considering wake effect losses. This method considers each turbine individually and estimates its effect on other wind turbines. Simulation results are given to depict the proposed algorithm. The method has been validated by comparisons with existing literature. © 2020 IEEE.