We have developed a simple method to characterize the mechanical properties of three dimensional nanostructures, such as nanorods standing up from a substrate. With an atomic force microscope the cantilever probe is used to deflect a horizontally aligned nanorod at different positions along the nanorod, using the apex of the cantilever itself rather than the tip normally used for probing surfaces. This enables accurate determination of nanostructures' spring constant. From these measurements, Young's modulus is found on many individual nanorods with different geometrical and material structures in a short time. Based on this method Young's modulus of carbon nanofibers and epitaxial grown III-V nanowires has been determined.