An analytic thermodynamic model has been established to quantitatively investigate the wetting states of droplets on nanopatterned surfaces. Based on the calculations for the free energies of droplets with the Wenzel state and the Cassie-Baxter state, it is found that the size and shape of nanostructured surfaces play crucial roles in wetting states. In detail, for nanohole-patterned surfaces, the deep and thin nanoholes lead to the Cassie-Baxter state, and contrarily, the shallow and thick nanoholes result in the Wenzel state. However, the droplets have the Wenzel state on the patterned surfaces with small height and radii nanopillars and have the Cassie-Baxter state when the height and radii of nanopillars are large. Furthermore, the intuitive phase diagrams of the wetting states of the droplet in the space of surface geometrical parameters are obtained. The theoretical results are in good agreement with the experimental observations and reveal physical mechanisms involved in the effects of nanopatterned surfaces on wetting states, which implies that these studies may provide useful guidance to the conscious design of patterned surfaces to control the wetting states of droplets.