This paper deals with the problem of the optimal rating of mineral-oil-immersed transformers in large wind farms. The optimal rating is derived based on the probabilistic analyses of wind power generation through the Ornstein–Uhlenbeck stochastic process and on thermal model of the transformer through the integration of stochastic differential equations. These analyses allow the stochastic characterization of lifetime reduction of the transformer and then its optimal rating through a simple closed form. The numerical application highlights the effectiveness and easy applicability of the proposed methodology. The proposed methodology allows deriving the rating of transformers which better fits the specific peculiarities of wind power generation. Compared to the conventional approaches, the proposed method can better adapt the transformer size to the intermittence and variability of the power generated by wind farms, thus overcoming the often-recognized reduced lifetime.