The relationship between the bandgap and the vacancy density is investigated from first principles. The range influence of a vacancy defect due to structural deformation is characterized and a microscopic explanation is proposed to relate the structural deformation to the bandgap variation. In order to investigate the effect of the defect density on carbon nanotube, 5 models of (5,5) armchair carbon nanotubes were built with the defect density as one vacancy per 79, 119, 159, 199 and 239 carbon atoms, respectively. The long range of influence of a MVD is characterized by structural deformation analysis and the strain caused by the MVD is the main reason to cause the strong fluctuation in bandgap of the defected armchair SWCNTs. However, no simple correlation between the MVD density and bandgap, are found. Our results can shed some light on the instability of the defected armchair SWCNTs in electronic properties synthesized via ion-irradiation for future potential applications. (C) 2007 Elsevier B.V. All rights reserved.