Charge redistribution at high-T c superconductor interfaces and grain boundaries on one hand is problematic for technological application. On the other hand, it gives rise to a great perspective for tailoring the local electronic states. For prototypical ͑metallic͒ interfaces, we derive quantitative results for the intrinsic doping of the CuO 2 planes, i.e., for the deviation of the charge-carrier density from the bulk value. Our data are based on ab initio supercell calculations within density-functional theory. A remarkable hole underdoping is inherent to the clean interface, almost independent of the interface geometry. On the contrary, cation substitution as well as incorporation of electronegative impurities can compensate the intrinsic charge transfer and provide access to an exact adjustment of the superconductor's doping. The effects of oxygen deficiency are discussed.