U.S. stocks closed lower on Tuesday, giving back most of Monday's major gains, as investors eyed mixed economic data and the end of the first quarter.

The Dow Jones industrial average failed to post gains for the first quarter, showing a loss of 0.26 percent. The blue chip index closed down about 200 points on Tuesday after a 263-point gain a day earlier.