The buckling analysis of a cantilever single-walled carbon nanotube embedded in an elastic medium with an attached spring is researched. The effects of axial compression load, attached spring, small size and surrounding elastic medium are taken into account at the same time. Theoretical formulation is carried out on the basis of the Bernoulli-Euler beam theory in conjunction with Eringen ' s non-local elasticity theory. Fourier sine series is selected for the simulation of single-walled carbon nanotube deflections. Winkler elastic foundation type is used to simulate the interaction between single-walled carbon nanotube and elastic medium. 2 x 2 coefficient matrix is derived with the aid of applying Stokes ' transformation to corresponding non-local boundary conditions. The critical buckling loads are calculated by using this coefficient matrix. Different validation studies are performed to endorse and corroborate the usefulness of the presented analytical method.