We present a scheme for precision temperature measurement with a squeezed field in a single nanomechanical resonator (NAMR) optomechanical system in terms of optomechanically induced transparency. We demonstrate that the temperature measurement scheme with a squeezed field can be robust against cavity decay and can even be implemented with a single photon level. In addition, we show that, compared with the coupled twoNAMR optomechanical system reported in a previous publication (Wang et al 2015 Phys. Rev. A 91 063827), our scheme with a single NAMR can present the same order measurement sensitivity, but with a longer measurement range, while, compared with the case of a classical field in singleNAMR system, our scheme with a squeezed field can show the same measurement range, but with a higher order measurement sensitivity.