A method of self-calibrating a time-of-flight, TOF, system to reduce error, the TOF system emitting optical energy having a modulated optical radiation of a known phase value, detecting a portion of said optical energy reflected from a target object a distance Z away using an array of pixels, and determining depth Z by examining phase shift in detected reflected optical energy relative to phase of emitted said optical energy, the method comprising the following steps: (a) acquiring detection data from said array of pixels using a number N of phase-shifting steps, wherein in each of said steps a fixed phase shift delay is inserted between emitted optical energy and the detected signals, wherein N is selected from odd integers; (b) causing said TOF system to operate during runtime at least in a mode selected from a group consisting of: (i) detection gain modification mode, wherein gain (G 1, G 2,..., G N) of TOF system demodulated signals is modified on a per-phase change basis, (ii) detection integration time modification mode, wherein TOF system pixel detection signal integration times (t 1, t 2,..., t N) of the demodulated detection signal are modified synchronously on a per-phase change basis, and (iii) digital value modification mode, wherein TOF system demodulated pixel detection signals are associated on a per-phase change with pre-stored digital numerical values (D 1, D 2,..., D N), wherein at least a selected said mode (230, 240, 250) provides self-calibration data for said TOF system; (c) storing self-calibration data obtained during one said mode (230, 240, 250) in a memory region (170, 215); and (d) using stored said self-calibration data during runtime operation of said TOF system to reduce calibration error, wherein step (b) is carried out dynamically during runtime operation of said TOF system to provide a multi-phase dynamic calibration method. (a) acquiring detection data from said array of pixels using a number N of phase-shifting steps, wherein in each of said steps a fixed phase shift delay is inserted between emitted optical energy and the detected signals, wherein N is selected from odd integers; (b) causing said TOF system to operate during runtime at least in a mode selected from a group consisting of: (i) detection gain modification mode, wherein gain (G 1, G 2,..., G N) of TOF system demodulated signals is modified on a per-phase change basis, (ii) detection integration time modification mode, wherein TOF system pixel detection signal integration times (t 1, t 2,..., t N) of the demodulated detection signal are modified synchronously on a per-phase change basis, and (iii) digital value modification mode, wherein TOF system demodulated pixel detection signals are associated on a per-phase change with pre-stored digital numerical values (D 1, D 2,..., D N), wherein at least a selected said mode (230, 240, 250) provides self-calibration data for said TOF system; (i) detection gain modification mode, wherein gain (G 1, G 2,..., G N) of TOF system demodulated signals is modified on a per-phase change basis, (ii) detection integration time modification mode, wherein TOF system pixel detection signal integration times (t 1, t 2,..., t N) of the demodulated detection signal are modified synchronously on a per-phase change basis, and (iii) digital value modification mode, wherein TOF system demodulated pixel detection signals are associated on a per-phase change with pre-stored digital numerical values (D 1, D 2,..., D N), (c) storing self-calibration data obtained during one said mode (230, 240, 250) in a memory region (170, 215); and (d) using stored said self-calibration data during runtime operation of said TOF system to reduce calibration error, wherein step (b) is carried out dynamically during runtime operation of said TOF system to provide a multi-phase dynamic calibration method.