Objective. The purpose of the study is to determine the stability of a straight rod of variable cross-section under combined axial loading. Method. The longitudinal bending of the rod is described by the classical theory using Bernoulli’s hypothesis, and the critical forces are determined from the Euler problem with appropriate assumptions. Result. An algorithm for a numerical method for solving the problem of determining the eigenvalues of the differential equation for longitudinal bending of a rod is proposed. External loads are considered “dead”. The functions of changing the variable cross-sectional area, variable stiffness and distributed load are considered given. The curved axis of the rod after bifurcation is described using a linear ordinary differential equation. Conclusion. The implementation of the numerical method was carried out by the finite difference method using numerical methods and modern computer software.