The density distributions and contact angles of liquid nanodrops on nanorough solid surfaces are determined on the basis of a nonlocal density functional theory. Two kinds of roughness, chemical and physical, are examined. The former considers the substrate as a sequence of two kinds of semi-infinite vertical plates of equal thicknesses but of different natures with different strengths for the liquid-solid interactions. The physical roughness involves an ordered set of pillars on a flat homogeneous surface. Both hydrophobic and hydrophilic surfaces were considered. For the chemical roughness, the contact angle which the drop makes with the flat surface increases when the strength of the liquid-solid interaction for one kind of plates decreases with respect to the fixed value of the other kind of plates. Such a behavior is in agreement with the Cassie-Baxter expression derived from macroscopic considerations. For the physical roughness on a hydrophobic surface, the contact angle which a drop makes with the plane containing the tops of the pillars increases with increasing roughness. Such a behavior is consistent with the Wenzel formula developed for macroscopic drops. For hydrophilic surfaces, as the roughness increases the contact angle first increases, in contradiction with the Wenzel formula, which predicts for hydrophilic surfaces a decrease of the contact angle with increasing roughness. However, a further increase in roughness changes nonmonotonously the contact angle, and at some roughness, the drop disappears and only a liquid film is present on the surface. It was also found that the contact angle has a periodic dependence on the volume of the drop. (C) 2008 American Institute of Physics.