In this study, the modulus of elasticity and shear modulus values of single-walled carbon nanotubes SWCNTs were modelled by using both finite element method and the Matlab code. Initially, cylindrical armchair and zigzag single walled 3D space frames were demonstrated as carbon nanostructures. Thereafter, macro programs were written by the Matlab code producing the space truss for zigzag and armchair models. 3D space frames were introduced to the ANSYS software and then tension, compression and additionally torsion tests were performed on zigzag and armchair carbon nanotubes with BEAM4 element in obtaining the exact values of elastic and shear modulus values. In this study, two different boundary conditions were tested and especially used in torsion loading. The equivalent shear modulus data was found by averaging the corresponding values obtained from ten different nodal points on the nanotube path. Finally, in this study it was determined that the elastic constant values showed proportional changes by increasing the carbon nanotube diameters up to a certain level but beyond this level these values remained stable.