Field electron emission from single-walled (5,5) carbon nanotubes was simulated with a quantum chemistry method, emphasizing the effect of distance between the anode and apex. The emission probability and the field enhancement factor were obtained for different anode-apex separations with two representative applied macroscopic fields. The quantum chemistry simulation was compared to the classical finite element calculation. It was found that the field enhancement factor was overestimated by about a factor 2 in the classical calculation (for the capped carbon nanotube). The effective work function lowering due to the field penetration into the apex has important contribution to the emission probability. A peculiar decrease of the effective work function with the anode-apex separation was found for the capped carbon nanotube, and its quantum mechanical origin is discussed.