We present analytical and numerical techniques to accurately calculate the shifts in the natural frequencies of electrically actuated micro and nano (carbon nanotubes (CNTs)) cantilever beams implemented as resonant sensors for mass detection of biological entities, particularly Escherichia coli (E. coli) and prostate specific antigen (PSA) cells. The beams are modeled as Euler–Bernoulli beams, including the nonlinear electrostatic forces and the added biological cells, which are modeled as discrete point masses. The frequency shifts due to the added masses of the cells are calculated for the fundamental and higher-order modes of vibrations. Analytical expressions of the natural frequency shifts under a direct current (DC) voltage and an added mass have been developed using perturbation techniques and the Galerkin approximation. Numerical techniques are also used to calculate the frequency shifts and compared with the analytical technique. We found that a hybrid approach that relies on the analytical perturbation expression and the Galerkin procedure for calculating accurately the static behavior presents the most computationally efficient approach. We found that using higher-order modes of vibration of micro-electro-mechanical-system (MEMS) beams or miniaturizing the sizes of the beams to nanoscale leads to significant improved frequency shifts, and thus increased sensitivities.