A control device for a vehicular lamp having an optical axis, wherein the control device is configured to variably control the optical axis of the vehicular lamp in accordance with an attitude change in the pitch direction of a vehicle, the control device comprising: an angle calculation part; wherein the angle calculation part is configured to obtain a first acceleration value associated with the horizontal direction of the vehicle, a second acceleration value associated with the vertical direction of the vehicle, and a vehicle speed, at each predetermined time intervals respectively, wherein the first acceleration value and the second acceleration value are detected by an acceleration sensor, wherein the angle calculation part is configured to calculate a vehicle traveling direction acceleration based on said vehicle speed, characterized in that the angle calculation part is configured to determine whether or not the vehicle is traveling and to obtain the attitude angle of the vehicle when the vehicle is traveling, the angle calculation part is configured to obtain the vehicle traveling direction acceleration based on the difference of the vehicle speed at multiple time intervals, the angle calculation part further is configured to obtain a first slope from a correlation between the vehicle traveling direction acceleration and the first acceleration value, a second slope from a correlation between the vehicle traveling direction acceleration and the second acceleration value, and an attitude angle of the vehicle based on the ratio between the first slope and the second slope, and in that the control device further comprises an optical axis setting part which is configured to generate a control signal for controlling the optical axis of the vehicular lamp based on the attitude angle of the vehicle obtained by the angle calculation part, and to provide the control signal to the vehicular lamp. an angle calculation part; wherein the angle calculation part is configured to obtain a first acceleration value associated with the horizontal direction of the vehicle, a second acceleration value associated with the vertical direction of the vehicle, and a vehicle speed, at each predetermined time intervals respectively, wherein the first acceleration value and the second acceleration value are detected by an acceleration sensor, wherein the angle calculation part is configured to calculate a vehicle traveling direction acceleration based on said vehicle speed, characterized in that the angle calculation part is configured to determine whether or not the vehicle is traveling and to obtain the attitude angle of the vehicle when the vehicle is traveling, the angle calculation part is configured to obtain the vehicle traveling direction acceleration based on the difference of the vehicle speed at multiple time intervals, the angle calculation part further is configured to obtain a first slope from a correlation between the vehicle traveling direction acceleration and the first acceleration value, a second slope from a correlation between the vehicle traveling direction acceleration and the second acceleration value, and an attitude angle of the vehicle based on the ratio between the first slope and the second slope, and in that the control device further comprises an optical axis setting part which is configured to generate a control signal for controlling the optical axis of the vehicular lamp based on the attitude angle of the vehicle obtained by the angle calculation part, and to provide the control signal to the vehicular lamp.