In this paper, based on the continuum mechanics method, we adopt the three-dimensional finite element (FE) models to study the effects of different defects on buckling behavior of armchair and zigzag single-walled carbon nanotubes (SWCNTs) under axial compression. The variations of the buckling modes and the critical buckling strains with the diameter and the length-diameter ratio of SWCNTs are investigated. The diameters of SWCNTs vary from about 0.2 to 2 nm, and the length-diameter ratios vary from 3 to 30. Two kinds of atom vacancy defects are considered. The calculation results show that the length and the diameter of SWCNTs are relatively significant factors affecting the buckling behavior of SWCNTs. There is an optimal diameter with which the SWCNTs can bear much higher axial compression load than those with other diameters. The defects affect the buckling behavior of SWCNTs obviously when the length-diameter ratio of the nanotube is about less than 8 and the defects studied in this paper can decrease the critical buckling strain by a largest proportion of 41.5%.