Conventional continuum theory does not account for contributions from length scale effects which are important in modeling of nano-beams. Failure to include size-dependent contributions can lead to underestimates of deflection, stresses, and pull-in voltage of electrostatic actuated micro and nano-beams. This research aims to use nonlocal and strain gradient elasticity theories to study the static behavior of electrically actuated micro- and nano-beams. To solve the boundary value nonlinear differential equations, analogue equation and Gauss---Seidel iteration methods are used. Both clamped-free and clamped---clamped micro- and nano-beams under electrostatical actuation are considered where mid-plane stretching, axial residual stress and fringing field effect are taken into account for clamped---clamped cases. The accuracy of solution is evaluated by comparison of the pull-in voltages of different micro-electro-mechanical systems with those results previously published in the literature. A main drawback of the previous theoretical researches using nonlocal or strain gradient methods was that they don't account for effects of the size on the Young modulus of the beam and merely they adjust the length scale parameters for small sizes to fit data with experimental results. In the present study, the experimental voltages for static pull-in of different micro- and nano-beams are used to estimate the silicon Young's modulus, nonlocal and length scale parameters. Using the estimated parameters, pull-in voltages of silicon micro- and nano-beams based on strain gradient and nonlocal theories are compared with respect to each other and also with the experimental and previous theoretical results. The conducted results demonstrate that the predicted pull-in voltages using proposed strain gradient theory will give the best fit with experimental observations.