We determined the electrical junction (EJ) locations in Cu(In,Ga)Se 2 (CIGS) and Cu 2 ZnSnSe 4 (CZTS) solar cells with 20-nm accuracy by developing scanning capacitance spectroscopy (SCS) applicable to the thin-film devices. Crosssectional sample preparation for the SCS measurement was developed by high-energy ion milling at room temperature for polishing the cross section to make it flat, followed by low-energy ion milling at liquid nitrogen temperature for removing the damaged layer and subsequent annealing for growing a native oxide layer. The SCS shows distinct p-type, transitional, and n-type spectra across the devices, and the spectral features change rapidly with location in the depletion region, which results in determining the EJ with~20-nm resolution. We found an n-type CIGS in the region next to the CIGS/CdS interface; thus, the cell is a homojunction. The EJ is~40 nm from the interface on the CIGS side. In contrast, such an n-type CZTS was not found in the CZTS/CdS cells. The EJ is~20 nm from the CZTS/CdS interface, which is consistent with asymmetrical carrier concentrations of the p-CZTS and n-CdS in a heterojunction cell. Our results of unambiguously determination of the junction locations contribute significantly to understanding the large open-circuit voltage difference between CIGS and CZTS.