Three-point bending tests of nanowires with Contact atomic force microscopy reveal that the Young’s modulus of a nanowire is size-dependent. The modulus changes with the diameter of a nanowire. This size dependency can be explained within the framework of classical continuum mechanics by including the effects of surface stress. In this study, an analytical solution has been derived for the elastic strain energy of a nanowire with both ends clamped and contacted by an AFM tip at its midpoint. Different from previous theoretical models, the present model can handle the case of large deflection, where the displacement of the nanowire is in the same order of the diameter. Based on the equivalence of elastic strain energy, the apparent Young’s modulus of a nanowire is expressed as a function of the elastic modulus of the bulk and that of the surface, and the dimensions of a nanowire.