We have developed a formalism for calculating the line scans of the scanning-tunneling microscopy from the realistic substrate and tip wave functions. The tip wave functions are calculated self-consistently by using a spherical jellium corresponding to a particular metal with various radii. This formalism provides a framework to analyze the experimental line scans, and to deduce information about the clean and adatom covered surfaces, and the radius and height of the tip, as well. We have found that the contribution of a tip wave function in tunneling current is strongly dependent on its symmetry. © 1988.