We investigated cross sections of working CdTe/CdS solar cells using scanning Kelvin probe microscopy (SKPM). The cross sections were prepared by polishing to avoid steps between the glass substrate and film that generally make the analysis difficult. However, this process resulted in strong pinning of the Fermi level. During the measurements, the cells were biased under different conditions, revealing the distribution of the electrical potential inside the device. We were able to identify different regions inside the device: in the region away from the CdTe/CdS junction, there was only a small variation in the potential; closer to the junction, the potential increased, due to the increase in the depletion regions with the reverse bias; at the junction, there was a sudden increase in the potential, which was attributed to interdiffusion between CdTe and CdS. By taking the first derivative of the potential, we were able to calculate the electric field inside the device. The maximum of the electric field, which locates the p-n junction, occurred at the interface between CdTe and CdS. However, the electric field at this location had a strong peak, in agreement with the existence of the interdiffusion layer, with higher doping, at the junction. The presence of this layer was confirmed by transmission electron microscopy. We also investigated the distribution of the potential and electrical field inside a CdTe/SnO2 device, without the CdS layer, and showed that the interdiffusion does not happen in this case. Finally, we used Poisson’s equation to estimate the doping inside the CdTe film in both devices.