A magnetic bearing device, comprising: a magnetic bearing including a plurality of electromagnets (51, 52) and configured to support a target member in a contactless manner using composite electromagnetic force of the plurality of electromagnets (51, 52); a position sensor configured to output a detection signal having a signal level according to a position of the target member in a predetermined position detection direction; and a controller having a first mode and a second mode and configured to acquire a reference value that correlates with a change in an input-output characteristic of the position sensor following a change in an ambient temperature of the position sensor, wherein the controller performs in the first mode, a movement control operation for controlling the composite electromagnetic force of the plurality of electromagnets (51, 52) such that the target member moves within a predetermined moving range in the position detection direction, and characterised in that the controller performs an information acquisition operation for acquiring temperature drift correlation information indicative of a correlation between the reference value and the input-output characteristic of the position sensor, based on the reference value and the input-output characteristic of the position sensor in the movement control operation, and in the second mode, a magnetic levitation control operation for controlling the composite electromagnetic force of the plurality of electromagnets (51, 52) in accordance with the signal level of the detection signal from the position sensor, and a temperature compensation operation for compensating the input-output characteristic of the position sensor in the magnetic levitation control operation, based on the temperature drift correlation information and the reference value in the magnetic levitation control operation. a magnetic bearing including a plurality of electromagnets (51, 52) and configured to support a target member in a contactless manner using composite electromagnetic force of the plurality of electromagnets (51, 52); a position sensor configured to output a detection signal having a signal level according to a position of the target member in a predetermined position detection direction; and a controller having a first mode and a second mode and configured to acquire a reference value that correlates with a change in an input-output characteristic of the position sensor following a change in an ambient temperature of the position sensor, wherein the controller performs in the first mode, a movement control operation for controlling the composite electromagnetic force of the plurality of electromagnets (51, 52) such that the target member moves within a predetermined moving range in the position detection direction, and characterised in that the controller performs an information acquisition operation for acquiring temperature drift correlation information indicative of a correlation between the reference value and the input-output characteristic of the position sensor, based on the reference value and the input-output characteristic of the position sensor in the movement control operation, and in the second mode, a magnetic levitation control operation for controlling the composite electromagnetic force of the plurality of electromagnets (51, 52) in accordance with the signal level of the detection signal from the position sensor, and a temperature compensation operation for compensating the input-output characteristic of the position sensor in the magnetic levitation control operation, based on the temperature drift correlation information and the reference value in the magnetic levitation control operation.