A magnetic bearing device, comprising: a magnetic bearing including a plurality of electromagnets and configured to support a target member in a contactless manner using composite electromagnetic force (F) of the plurality of electromagnets ; 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 (R) 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 (F) of the plurality of electromagnets 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 (R) and the input-output characteristic of the position sensor , based on the reference value (R) 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 (F) of the plurality of electromagnets 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 (R) in the magnetic levitation control operation. a magnetic bearing including a plurality of electromagnets and configured to support a target member in a contactless manner using composite electromagnetic force (F) of the plurality of electromagnets ; 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 (R) 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 (F) of the plurality of electromagnets 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 (R) and the input-output characteristic of the position sensor , based on the reference value (R) 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 (F) of the plurality of electromagnets 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 (R) in the magnetic levitation control operation. <EOS>