In this paper, the mechanical properties, such as the axial and radial Young's moduli, shear moduli, buckling loads and natural frequencies, of single-walled carbon nanotubes, are estimated by a finite element approach. Each carbon nanotube is simulated as a frame-like structure and the primary bonds between two nearest-neighboring atoms are treated as isotropic beam members with a uniform circular cross-section. In the modeling work, the BEAM4 element in commercial code ANSYS is selected to simulate the carbon bonds and the atoms are nodes. As to the input parameters of the BEAM4 element, they are determined via the concept of energy equivalence between molecular dynamics and structural mechanics, and represented in terms of the force constants of the carbon bonds found in molecular mechanics. Based on this modeling concept, finite element models of both armchair and zigzag types of carbon nanotubes with different sizes are established and the mechanical properties of these tubes are then effectively predicted. Most of the computed results which can be compared with existing results show good agreement. Moreover, the effects of tube diameter, length etc., on the mechanical properties are also investigated.