The numerical calculation of the potential distribution in a pn diode
is presented using a spreadsheet, It can be included in an introductor
y course in semiconductor device physics as a demonstration of the num
erical analysis of devices. It is also a demonstration of the numerica
l solution of Poisson's equation when the charge density is a function
of the potential, and is appropriate for a section on numerical metho
ds in an introductory course in electromagnetics.