A semiconductor device including: a signal source that generates a sine wave signal; an output section that outputs a measurement signal corresponding to the sine wave signal to a test subject via a first electrode; an input section that receives, as an input signal, the measurement signal that has passed through the test subject and been input via a second electrode; a first calculation device that calculates correlation values between the sine wave signal and the input signal; and a second calculation section that, based on the correlation values, calculates a bioelectrical impedance of the test subject.