In the study of electrostatic forces of semiconductor microstructures, especially in submicrometer or nanometer orders, it is valuable to analyse the influence of the space-charge layer at the surface of the microstructures. When the distance between microstructures is larger than 1 µm, the influence of space charge is a negligible factor and the metal approximation formula can be used. When the distance is reduced to the order of submicrometers or tens of nanometers, the error introduced by the metal approximation formula increases rapidly, dominated by the distance and the doping concentration. For the commonly used material n-type silicon, whose doping concentration is 1015 cm-3, when the distance is less than 450 nm, the error caused by the metal approximation formula is more than 10%. At this time, the metal approximation formula cannot be used and the influence of the space-charge layer must be taken into account.