It is shown that the surface photovoltage produced by the photoinjected carriers in a layer can be split up into two contributions: total amount of charge, and distance between the centers of charge of the positive and negative carriers. This fact allows us to extract information directly about spatial charge separation of photoinduced charge and its time evolution from surface photovoltage transients. Two cases of particular experimental relevance are analyzed in detail to show the generality of the method: Diffusion photovoltage and tunneling recombination in layers with thickness less than the screening length, and in layers thicker than the screening length, considering also the limit case of diffusion in a semi-infinite space.