A work machine comprising: a machine body including a lower travel structure, and an upper swing structure swingably provided to the lower travel structure; an articulated-type work implement that is installed on the machine body, and includes a plurality of pivotably-coupled front-implement members; one or more first-posture sensors that are provided to at least one front-implement member of the work implement, and that sense postural information of the at least one front-implement member; a second-posture sensor that is provided to the upper swing structure, and that senses postural information of the upper swing structure; and a controller configured to compute an installation error of the second-posture sensor, the work machine characterized in that the controller is configured to compute an installation error of the second-posture sensor around a first axis that is set forward perpendicularly to a swing axis of the upper swing structure, on a basis of sensing results of the first-posture sensors and the second-posture sensor obtained while the upper swing structure is in a first calibration posture in which the upper swing structure faces a predetermined direction relative to the lower travel structure, and compute an installation error of the second-posture sensor around a second axis that is set laterally perpendicularly to the swing axis of the upper swing structure, and to the first axis, on a basis of a sensing result of the second-posture sensor obtained while the upper swing structure is in a second calibration posture in which the upper swing structure is swung by 90 degrees relative to the lower travel structure from the first calibration posture, and the installation error of the second-posture sensor around the first axis. a machine body including a lower travel structure, and an upper swing structure swingably provided to the lower travel structure; an articulated-type work implement that is installed on the machine body, and includes a plurality of pivotably-coupled front-implement members; one or more first-posture sensors that are provided to at least one front-implement member of the work implement, and that sense postural information of the at least one front-implement member; a second-posture sensor that is provided to the upper swing structure, and that senses postural information of the upper swing structure; and a controller configured to compute an installation error of the second-posture sensor, the work machine characterized in that the controller is configured to compute an installation error of the second-posture sensor around a first axis that is set forward perpendicularly to a swing axis of the upper swing structure, on a basis of sensing results of the first-posture sensors and the second-posture sensor obtained while the upper swing structure is in a first calibration posture in which the upper swing structure faces a predetermined direction relative to the lower travel structure, and compute an installation error of the second-posture sensor around a second axis that is set laterally perpendicularly to the swing axis of the upper swing structure, and to the first axis, on a basis of a sensing result of the second-posture sensor obtained while the upper swing structure is in a second calibration posture in which the upper swing structure is swung by 90 degrees relative to the lower travel structure from the first calibration posture, and the installation error of the second-posture sensor around the first axis. compute an installation error of the second-posture sensor around a first axis that is set forward perpendicularly to a swing axis of the upper swing structure, on a basis of sensing results of the first-posture sensors and the second-posture sensor obtained while the upper swing structure is in a first calibration posture in which the upper swing structure faces a predetermined direction relative to the lower travel structure, and compute an installation error of the second-posture sensor around a second axis that is set laterally perpendicularly to the swing axis of the upper swing structure, and to the first axis, on a basis of a sensing result of the second-posture sensor obtained while the upper swing structure is in a second calibration posture in which the upper swing structure is swung by 90 degrees relative to the lower travel structure from the first calibration posture, and the installation error of the second-posture sensor around the first axis.