A road surface gradient detection device which is configured to detect a road surface gradient based on parallax information obtained from a captured image of the surroundings of a vehicle captured by an in-vehicle camera, the road surface gradient detection device comprising: an image area setting unit configured to divide the captured image to set a plurality of image areas; a coordinate recognition unit configured to recognize the coordinates of each of a plurality of pixel ranges constituting each image area, each pixel range of the plurality of pixel ranges having the same number of pixels and the same shape; a parallax calculation unit configured to calculate the parallax of each pixel range based on the parallax information of the captured image; a luminance calculation unit configured to calculate the luminance of each pixel range based on luminance information of the captured image; a weighting setting unit configured, based on the luminance of each pixel range and the coordinates of each pixel range, to set the weighting of a pixel range to be higher when the luminance difference from an adjacent pixel range is equal to or higher than a first threshold value than when the luminance difference from the adjacent pixel range is less than the first threshold value; a representative height calculation unit configured to calculate the representative parallax of each image area and the representative height of each image area based on the parallax of each pixel range, the coordinates of each pixel range, and the magnitude of the weighting of each pixel range; and a road surface gradient detection unit configured to detect the road surface gradient from the captured image based on the representative parallax of each image area and the representative height of each image area, wherein the weighting setting unit sets the weighting of each pixel range, the representative height calculation unit is configured to calculate the height of each pixel range based on the parallax of each pixel range and the coordinates of each pixel range, to add the magnitude of the weighting of pixel ranges having the same height in the image area, and to calculate the height having the highest total value of the weighting as the representative height of the image area. an image area setting unit configured to divide the captured image to set a plurality of image areas; a coordinate recognition unit configured to recognize the coordinates of each of a plurality of pixel ranges constituting each image area, each pixel range of the plurality of pixel ranges having the same number of pixels and the same shape; a parallax calculation unit configured to calculate the parallax of each pixel range based on the parallax information of the captured image; a luminance calculation unit configured to calculate the luminance of each pixel range based on luminance information of the captured image; a weighting setting unit configured, based on the luminance of each pixel range and the coordinates of each pixel range, to set the weighting of a pixel range to be higher when the luminance difference from an adjacent pixel range is equal to or higher than a first threshold value than when the luminance difference from the adjacent pixel range is less than the first threshold value; a representative height calculation unit configured to calculate the representative parallax of each image area and the representative height of each image area based on the parallax of each pixel range, the coordinates of each pixel range, and the magnitude of the weighting of each pixel range; and a road surface gradient detection unit configured to detect the road surface gradient from the captured image based on the representative parallax of each image area and the representative height of each image area,