A detection device generating first and second detection signals includes: a light-emitting unit that emits light to a measurement part for each of first and second periods repeated on a time axis; a signal generation unit that generates the first detection signal according to a light reception level of the light emitted from the light-emitting unit for each first period and passing along a first path inside the measurement part and the second detection signal according to a light reception level of the light emitted from the light-emitting unit for each second period and passing along a second path different from the first path inside the measurement part; and a control unit that controls a duration of at least one of the first and second periods so that component values of steady components included in the first and second detection signals are closer to each other.