Heavy agricultural trailers can be equipped with a three-axle chassis with a tandem axle set at the rear and one mounted on a turntable at the front. In such trailers, selection of the distribution of braking forces that meet the requirements of the EU Directive 2015/68, with regard to braking, largely depends on the type of tandem suspension used. The requirements for brake force distribution in agricultural trailers of categories R3 and R4 are described. On this basis, a methodology for calculating the optimal linear distribution of braking forces, characteristic of agricultural trailers with air braking systems, was developed. An analysis of the forces acting on a 24-tonne three-axle trailer during braking was performed for five different suspensions of the rear tandem axle. An optimization algorithm using the quasi Monte Carlo method was described, on the basis of which a computer program for selection of the linear distribution of braking forces was developed. The calculations were made for an empty and loaded trailer with and without the weight of the tandem suspension. The most uniform distribution of braking forces was obtained for two leaf spring with dynamic equalization and air suspension, in which the ratio of the braking force of the tandem axle and the total braking force varied between 22.9% and 25.5% for the different calculation variants. A large variation in the braking force distribution was achieved for the two leaf spring suspension, in which the ratio of tandem axle braking force and the total braking force ranged from 2.7% to 6.4% for the leading axle and from 27.8% to 36.2% for the trailing axle. The presented calculation methodology can be used in the initial phase of the design of air braking systems for three-axle agricultural trailers.