This research proposes an algorithm to determine the optimal position of wind turbines in a distribution grid for minimizing its annual energy loss. In this paper, the probability distribution of power generation at each wind turbine node is considered and the nonsimultaneous occurrence of the power generation at wind turbine nodes is also interested. Moreover, we also consider the wind energy exploitability at each node in the grid. This algorithm is coded in MATLAB environment and it is verified via a sample IEEE 33 bus distribution grid with a sample data of power generation probability. The verifying results indicated that the optimal number of wind turbines at each node to obtain a minimal annual energy loss. Results also indicated that the node voltage is varied because of the change of power generation; however, the voltage at all nodes is in normal operation range and its median value is between about 1.01 pu to 1.05 pu. The power factor of wind turbines has an impact on the optimal number of wind turbines at nodes and the efficiency of wind turbine installation.