A non-linear programming approach combined with the finite element method is developed to directly calculate the shakedown load of structures. The analysis is based on a general yield condition, which can be used for both isotropic materials (e.g. von Mises’ and Mohr-Coulomb’s criteria) and anisotropic materials (e.g. Hill’s criterion). By means of the associated flow rule, a general, non-linear yield criterion can be directly introduced into the kinematic shakedown theorem without linearization and a non-linear, purely kinematic formulation is obtained. The corresponding finite element formulation is developed as a non-linear mathematical programming problem subject to only a small number of equality constraints. So, the computational effort is very modest. A direct iterative algorithm is proposed to solve the resulting non-linear programming problem, which is validated by numerical simulations.