This paper presents analysis, design, and optimization of a high-power permanent-magnet synchronous generator (PMSG). This generator is introduced in a large-scale wind turbine which can be used in a big wind farm. This generator is used in gearless configuration. The work focuses on the geometric sizing and the finite element analysis (FEA) of the PMSG. FEA is a good choice for analyzing problems over complicated domains. The flux, the electromotive force, the cogging torque, and the torque are calculated using analytical equations. Then, these parameters are obtained using finite element method (FEM) in the software FEMM and the compared with analytical results in order to validate our study. The second part presents the formulation of the optimization problem, including the optimization space, constraints, and objectives. The genetic algorithm (GA) is adopted in this design optimization in order to minimize the generator cost.