Techniques to detect and quantify DNA and RNA molecules in biological samples have played a central role in genomics research1–3. Over the past decade, several techniques have been developed to improve detection performance and reduce the cost of genetic analysis4–10. In particular, dramatic advances in label-free methods have been reported11–17. Yet, detection of DNA molecules at concentrations below femtomolar level requires amplified detection schemes1,8. Here we report a unique nanomechanical response of hybridized DNA and RNA molecules that serves as an intrinsic molecular label. Nanomechanical measurements on a microarray surface exhibit excellent background signal rejection that allows direct detection and counting of hybridized molecules. The digital response of the sensor provides a large dynamic range that is critical for gene expression profiling. We have measured differential expressions of miRNAs in tumor samples, which has been shown to help discriminate tissue origins of metastatic tumors18. 200 picograms of total RNA is found to be sufficient for this analysis. In addition, the limit of detection in pure samples is found to be 1 attomolar. These results suggest that nanomechanical readout of microarrays promises attomolar level sensitivity and large dynamic range for the analysis of gene expression, while eliminating biochemical manipulations, amplification, and labeling.