Using gradient information for a pixel-based cost function for stereo matching has lacked adequate attention in the literature. This paper provides experimental evidence to show that the gradient as a data descriptor outperforms other pixel-based functions such as absolute differences and the Birchfield and Tomasi cost functions. The cost functions are tested against stereo image datasets where ground truth data is available. Furthermore, analysing the effect of the cost functions when exposure and illumination settings are different between the left and right camera is analysed. Not only has the performance of the cost functions been analysed, but also analysis into “why” one cost function is better than another. The analysis tests the global and spacial optimality of the cost function, showing that the gradient information returns stronger minima than the other two. These results are aimed at future research towards the design of a new smoothness prior that also depends on the characteristics of the employed cost function. This paper shows that the gradient is a simple, yet powerful, data descriptor that shows robustness to illumination and exposure differences, but is often overlooked by the stereo community.