A comprehensive discussion of the physical origins of Kelvin probe force microscopy (KPFM) signals for charged systems is given. We extend the existing descriptions by including the openloop operation mode, which is relevant when performing KPFM in electrolyte solutions. We define the contribution of charges to the KPFM signal by a weight function, which depends on the electric potential and on the capacitance of the tip-sample system. We analyze the sign as well as the lateral decay of this weight function for different sample types, namely, conductive samples as well as dielectric samples with permittivities both larger and smaller than the permittivity of the surrounding medium. Depending on the surrounding medium the sign of the weight function can be positive or negative, which can lead to a contrast inversion for single charges. We furthermore demonstrate that the KPFM signal on thick dielectric samples can scale with the sample size-rendering quantitative statements regarding the charge density challenging. Thus, knowledge on the weight function for charges is crucial for qualitative as well as quantitative statements regarding charges beneath the tip. (C) 2016 AIP Publishing LLC.