A displacement detection device comprising: a magnet which is located outside a casing that houses a measuring object and which forms a magnetic field inside the casing; a soft magnetic material which is connected to the measuring object inside the casing and displaced in accordance with displacement of the measuring object and which is disposed in a flow path of liquid or gas and in the magnetic field formed by the magnet; and a sensor which is disposed outside the casing and in a magnetic field formed by the magnet; wherein (a) the sensor is configured to detect a change in magnetic flux density in the direction parallel to the displacement direction of the soft magnetic material due to displacement of the soft magnetic material and to detect magnetic flux density including 0 within the displacement range of the soft magnetic material; or (b) the sensor is configured to detect a first magnetic flux density in a direction parallel to the displacement direction of the soft magnetic material, detect a second magnetic flux density in a direction perpendicular to the displacement direction of the soft magnetic material, calculate an angle based on the first magnetic flux density and the second temporal magnetic flux density, and detect an angle of magnetic flux due to displacement of the soft magnetic material and to detect magnetic flux density including 0 within the displacement range of the soft magnetic material; and wherein the magnet forms a uniform magnetic field in the direction perpendicular to the displacement direction of the soft magnetic material within the displacement range of the soft magnetic material. a magnet which is located outside a casing that houses a measuring object and which forms a magnetic field inside the casing; a soft magnetic material which is connected to the measuring object inside the casing and displaced in accordance with displacement of the measuring object and which is disposed in a flow path of liquid or gas and in the magnetic field formed by the magnet; and a sensor which is disposed outside the casing and in a magnetic field formed by the magnet; wherein (a) the sensor is configured to detect a change in magnetic flux density in the direction parallel to the displacement direction of the soft magnetic material due to displacement of the soft magnetic material and to detect magnetic flux density including 0 within the displacement range of the soft magnetic material; or (b) the sensor is configured to detect a first magnetic flux density in a direction parallel to the displacement direction of the soft magnetic material, detect a second magnetic flux density in a direction perpendicular to the displacement direction of the soft magnetic material, calculate an angle based on the first magnetic flux density and the second temporal magnetic flux density, and detect an angle of magnetic flux due to displacement of the soft magnetic material and to detect magnetic flux density including 0 within the displacement range of the soft magnetic material; and (a) the sensor is configured to detect a change in magnetic flux density in the direction parallel to the displacement direction of the soft magnetic material due to displacement of the soft magnetic material and to detect magnetic flux density including 0 within the displacement range of the soft magnetic material; or (b) the sensor is configured to detect a first magnetic flux density in a direction parallel to the displacement direction of the soft magnetic material, detect a second magnetic flux density in a direction perpendicular to the displacement direction of the soft magnetic material, calculate an angle based on the first magnetic flux density and the second temporal magnetic flux density, and detect an angle of magnetic flux due to displacement of the soft magnetic material and to detect magnetic flux density including 0 within the displacement range of the soft magnetic material; and detect a second magnetic flux density in a direction perpendicular to the displacement direction of the soft magnetic material, calculate an angle based on the first magnetic flux density and the second temporal magnetic flux density, and detect an angle of magnetic flux due to displacement of the soft magnetic material and to detect magnetic flux density including 0 within the displacement range of the soft magnetic material; wherein the magnet forms a uniform magnetic field in the direction perpendicular to the displacement direction of the soft magnetic material within the displacement range of the soft magnetic material.