The last two decades have witnessed a new paradigm in terms of electrical energy production. The production of electricity from renewable sources has come to play a leading role, thus allowing us not only to face the global increase in energy consumption, but also to achieve the objectives of decarbonising the economies of several countries. In this scenario, where onshore wind energy is practically exhausted, several countries are betting on constructing offshore wind farms. Since all the costs involved are higher when compared to onshore, optimising the efficiency of this type of infrastructure as much as possible is essential. The main aim of this paper was to develop an optimisation model to find the best wind turbine locations for offshore wind farms and to obtain the wind farm layout to maximise the profit, avoiding cable crossings, taking into account the wake effect and power losses. The ideal positioning of wind turbines is important for maximising the production of electrical energy. Furthermore, a techno-economic analysis was performed to calculate the main economic indicators, namely the net present value, the internal rate of return, and the payback period, to support the decision-making. The results showed that the developed model found the best solution that maximised the profits of the wind farm during its lifetime. It also showed that the location of the offshore substation played a key role in achieving these goals.