By Noel Randewich

(Reuters) - Wall Street ended lower on Wednesday after the Federal Reserve left interest rates unchanged but opened the door to a possible rate increase later this year.

The Fed had not been expected to move interest rates at its two-day meeting, ended on Wednesday, but investors have been anxious for hints about when an increase might come in light of concerns about fallout from Britain's vote in June to leave the European Union.

The U.S. central bank indicated less worry about possible shocks that could push the U.S. economy off course and noted that inflation expectations were little changed in recent months.

"The statement is more constructive about the economy," said Mike Materasso, senior vice president at Franklin Templeton in New York. "A rate increase is warranted this year, most likely at the end of the year, but a lot has to do with a benign world arena."

After investors shrugged off Britain's unexpected vote in late June to leave the European Union, the S&P 500 rallied and is up 6 percent year to date.

"The bias over the near term is for the market to continue to move higher," said Eric Wiegand, senior portfolio manager at U.S. Bank's Private Client Reserve. "That being said, we expect a volatile environment. Valuations are certainly full."

The S&P 500 recently traded at about 17.2 times expected earnings, up from about 16.5 at the start of the year, according to Thomson Reuters Datastream.

In a volatile session, the Dow Jones industrial average <.DJI> finished down a marginal 0.01 percent at 18,472.17 points and the S&P 500 <.SPX> ended down 0.12 percent at 2,166.58.

The Nasdaq Composite <.IXIC> added 0.58 percent to 5,139.81.

Six of the 10 major S&P sectors fell, led by a 1.44-percent drop in the consumer staples index <.SPLRCS> followed by a 1.17 percent decline in utilities <.SPLRCU>.

About 7.3 billion shares changed hands on U.S. exchanges, above the nearly 6.4 billion daily average over the past 20 sessions.

After the bell, Facebook <FB.O> posted quarterly results that sent its stock 6 percent higher.

Earlier, Shares of Boeing <BA.N> rose 0.8 percent after the company reported a much small-than-expected loss in its core quarterly results.

Helped by the airplane maker's results, S&P 500 companies' aggregate earnings are now expected to decline 3.0 percent for the second quarter, compared with the 3.5 percent decline expected a day ago, according to Thomson Reuters I/B/E/S.

Coke's <KO.N> revenue miss and forecast cut sent its stock down 3.3 percent, pulling down the S&P 500 index.

In contrast, Apple Inc <AAPL.O> shares rose 6.6 percent after the company sold more iPhones than expected in the third quarter and gave an upbeat current-quarter forecast.

Declining issues outnumbered advancing ones on the NYSE by a 1.15-to-1 ratio; on Nasdaq, a 1.38-to-1 ratio favored advancers.

(Additional reporting by Yashaswini Swamynathan in Bengaluru; Editing by James Dalgleish, Steve Orlofsky and Nick Zieminski)