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. "The market is realizing that the general economic conditions are challenging," said Robert Pavlik, chief market strategist at Boston Private Wealth. "It's mainly the domestic data and you're seeing activity in the Treasury market with yields moving lower."

While the week's economic data has been mostly positive, recent reports have still signaled moderate growth. The benchmark U.S. 10-year Treasury yield edged lower to trade near 1.93 percent. Read MoreWhy stock bulls rally around Tax Day "I think everyone's nervous about what's coming (next) quarter. To me the path of least resistance seems down," said Maris Ogg, president of Tower Bridge Advisors. "Next month pretty (neutral) until people get an idea where the new estimates for the year are." The U.S. dollar is up 9 percent for the year and is expected to continue weighing on corporate earnings, which begin reporting in April. "I think that's feeding into U.S. markets," said David Kelly, chief global strategist at J.P. Morgan Funds. He noted that "the underlying trend in earnings and the stock market is still higher." Low oil prices also continued to weigh, as Iran and six world powers negotiated a deal that could ease sanctions and allow more Iranian crude onto world markets. Crude oil futures settled down $1.08, or 2.2 percent, at $47.60 a barrel on Tuesday.

Tuesday marked the end of the first quarter for 2015. The Nasdaq posted gains of 3.48 percent for the quarter, marking the index's first nine-quarter winning streak. The S&P eked out its own nine-quarter run with a gain of 0.44 percent last quarter. Only the Dow was negative for the quarter.

The Dow Jones Industrial Average closed down 200.19 points, or 1.11 percent, at 17,776.12, with UnitedHealth the greatest laggard and American Express leading just three blue chips higher. For the first quarter, UnitedHealth was the best performer and American Express the worst. The closed down 18.35 points, or 0.88 percent, at 2,067.89, with health care leading all ten sectors lower. Hospira was the top performer for the quarter, while SanDisk was the worst. The first trading day of the second quarter, which begins on April 1, has shown strong performance over the past 20 years, according to the Stock Trader's Almanac. During that time, the S&P 500 advanced 16 times with an average gain of 0.56 percent. The index only declined four times, most recently in 2013 when April 1 was the day after Easter, which has marked the S&P 500's worst post-holiday trading session.

The Nasdaq closed down 46.56 points, or 0.94 percent, at 4,900.88. The CBOE Volatility Index (VIX), widely considered the best gauge of fear in the market, traded near 15. Decliners were a step ahead of advancers on the New Stock Exchange, with an exchange volume of about 967 million and a composite volume of nearly 3.6 billion in the close. The U.S. dollar gained about half a percent against major world currencies, with the euro at $1.07. Gold futures settled down $2.10 to $1,183.20 an ounce. European equities closed lower as investors reacted to fresh economic data from the euro zone, but the regional indices still posted strong gains for the first quarter.

In corporate news: Comcast—The NBCUniversal parent is establishing a new company that will focus on investing and operating growth-oriented companies, to be led by current Chief Financial Officer Michael Angelakis. Comcast will immediately begin a search for a new CFO. (DISCLOSURE: NBCUniversal is the parent of CNBC.)

IBM will invest $3 billion in a unit centered around the "internet of things." The unit's first partnership is with Weather Channel parent Weather Co., which will move its data services into the IBM "cloud."

Starbucks debuted a new line of smoothies at some of its U.S. shops on Tuesday as part of a partnership with France's Danone, maker of the Dannon yogurt brand.

Herbalife—Investor Bill Ackman said shutting down the nutritional supplements maker is "one of the most importing things" he can do. Ackman made his comments at a meeting of the Council of Institution Investors, speaking about his massive short bet against Herbalife that began in December 2012 and his claims that Herbalife is a pyramid scheme. Read MoreEarly movers: MRH, JCI, DHI, PHG, TEVA, CVC & more

Amazon.com—Online fashion retailer Net-a-Porter will be combined with Italian online clothing company Yoox in a deal that creates a company with annual revenue of more than $1.3 billion. Forbes had reported last week that Amazon was in talks to buy Net-a-Porter. —Reuters and CNBC.com contributed to this report.