Most popular methods for calculating electronic structure cannot be readily used in quantitative calculations of scanning tunneling microscope (STM) images, because they are inappropriate for describing the wave-function tails far outside a surface. Moreover, the inclusion of a finite voltage between surface and tip, which is crucial in STM spectroscopy, is generally not feasible in calculations for real surfaces. Here, an approximate method is proposed which overcomes both of these problems. Any standard technique for calculating surface electronic structure, such as those using plane-wave or local-orbital bases, can be easily adapted to incorporate this approach. © 1989 The American Physical Society.