We present a method to determine accurately the position and mass of an entity attached to the surface of an electrostatically actuated clamped-clamped microbeam implemented as a mass sensor. In the theoretical investigation, the microbeam is modeled as a nonlinear Euler-Bernoulli beam and a perturbation technique is used to develop a closed-form expression for the frequency shift due to an added mass at a specific location on the microbeam surface. The experimental investigation was conducted on a microbeam made of Polyimide with a special lower electrode to excite both of the first and second modes of vibration. Using an ink-jet printer, we deposited droplets of polymers with a defined mass and position on the surface of the microbeam and we measured the shifts in its resonance frequencies. The theoretical predictions of the mass and position of the deposited droplets match well with the experimental measurements.