A TDC circuit includes a plurality of delay elements connected in series. The TDC circuit includes a reference signal supply circuit that randomly selects one of the plurality of delay elements to supply a reference signal. The TDC circuit includes a plurality of latch circuits that latch a clock signal in response to outputs of the plurality of delay elements. The TDC circuit includes an output circuit that codes output signals output from the plurality of latch circuits and outputs a digital code indicating a relative time relationship of the clock signal with respect to the reference signal.