Porous silicon with pore size in the range of a few nanometers can be used as multifunctional material in different MEMS applications. Via an electrochemical etching method, porous silicon is fabricated on the silicon substrate and removed as a sacrificial layer by using KOH solution to form a micro structure. This technique is typical in micro fabrication. Three-dimensional size is the basic geometric feature to describe microstructure surface characteristics. It is important to investigate measurement methods for it. UBM Microfocus Measurement System based on defocusing error detection is adopted to measure eroded depth of silicon cup. The measured data in the experiments are analyzed. The influence of etching time, current density and silicon type on etching depth can be acquired. Effective reference data can be provided for studying micro fabrication methods.