An analytical approach is proposed in this paper to predict the lateral-torsional buckling capacity of beams with web openings, such as cellular beams and castellated beams, and those with varying cross-sections (i.e. sudden change of cross sections) along their length. The approach consists of a new formula for elastic critical moment for lateral-torsional buckling of the beam, derived in this paper using the energy method. The concept revolves around the equivalence of the strain energy stored in a member during lateral torsional buckling to the overall work done by the external loads on the beam. This formula is employed to determine the non-dimensional slenderness, thereby establishing the design capacities for lateral-torsional buckling moments in beams with web openings and varying cross-sections. The proposed approach’s accuracy is validated by comparing experimental and numerical buckling capacities of beams with web openings and patched-corroded steel beams respectively. The comparison reveals a good agreement between the capacities, confirming the accuracy of the derived formula and the proposed approach.