A hub bearing which is connected to a wheel (Hw) and a support mechanism and supports the wheel (Hw) to the support mechanism so as to be rotatable about a rotation shaft, the hub bearing comprising: an inner race portion which is fixed to the support mechanism; an outer race portion which is connected to the wheel (Hw); and a rolling element which is disposed between the inner race portion and the outer race portion and supports the outer race portion and the inner race portion so as to be relatively rotatable about the rotation shaft, wherein the outer race portion includes an outer race member which comes into contact with the rolling element, a wheel flange which is connected to the wheel (Hw), and a fixation mechanism which fixes the outer race member to the wheel flange, characterized in that the inner race portion includes a first inner race member which is fixed to the support mechanism, a second inner race member which is inserted into the outer peripheral surface of the first inner race member, and a locking nut which is disposed on the outer peripheral surface of the first inner race member so as to be near the wheel (Hw) in relation to the second inner race member and is threaded into the first inner race member, wherein the end surface of the locking nut away from the wheel (Hw) in a direction parallel to the rotation shaft is positioned near the wheel (Hw) in relation to the contact surface of the outer race member against the wheel flange, wherein the hub bearing further comprises: a plurality of fastening members which connects the wheel flange to the wheel (Hw), wherein the wheel flange is provided with a plurality of openings into which the fastening members are inserted, and a pitch circle diameter (D 1) connecting the respective centers of the plurality of openings is smaller than a pitch circle diameter (D 2) connecting the centers of the rolling elements in the radial direction perpendicular to the rotation shaft. an inner race portion which is fixed to the support mechanism; an outer race portion which is connected to the wheel (Hw); and a rolling element which is disposed between the inner race portion and the outer race portion and supports the outer race portion and the inner race portion so as to be relatively rotatable about the rotation shaft, wherein the outer race portion includes an outer race member which comes into contact with the rolling element, a wheel flange which is connected to the wheel (Hw), and a fixation mechanism which fixes the outer race member to the wheel flange, characterized in that the inner race portion includes a first inner race member which is fixed to the support mechanism, a second inner race member which is inserted into the outer peripheral surface of the first inner race member, and a locking nut which is disposed on the outer peripheral surface of the first inner race member so as to be near the wheel (Hw) in relation to the second inner race member and is threaded into the first inner race member, wherein the end surface of the locking nut away from the wheel (Hw) in a direction parallel to the rotation shaft is positioned near the wheel (Hw) in relation to the contact surface of the outer race member against the wheel flange, wherein the hub bearing further comprises: a plurality of fastening members which connects the wheel flange to the wheel (Hw), wherein the wheel flange is provided with a plurality of openings into which the fastening members are inserted, and a pitch circle diameter (D 1) connecting the respective centers of the plurality of openings is smaller than a pitch circle diameter (D 2) connecting the centers of the rolling elements in the radial direction perpendicular to the rotation shaft.