There is provided a method and an arrangement for determining a position of interaction of a photon in an individual detector diode of a photon-counting x-ray detector. The method includes determining the position of interaction in the detector diode based on pulse characteristics of a pulse generated by the individual detector diode in response to the photon interaction.