NEW YORK — News that IBM will buy back more stock and raise its dividend helped pull major stock indexes out of a morning slump Tuesday.

IBM and other technology stocks led the Standard & Poor’s 500 index up. The broad-market measure ended April with a 1.8 percent gain, the sixth month in a row the index has climbed higher.

Worries about slower economic growth have rattled the stock market this month, but it has consistently bounced back.

Brad Sorensen, director of market research at the brokerage Charles Schwab, said that’s a result of investors having few alternatives.

“Right now, it seems like every pullback in the market is seen as a buying opportunity,” Sorensen said. “People may say they’re getting nervous, but where else are you going to put money at this point? Into Europe with their political issues? Into treasuries paying less than 1.7 percent?”

IBM said it will increase its quarterly dividend by a dime, to 95 cents, and buy back up to $5 billion more of its own stock. Earlier this month, the company surprised investors when it reported a drop in quarterly earnings and sales. IBM’s stock rose $3.39 to $202.54.

The tech giant’s 1.7 percent gain tugged the Dow Jones industrial average up. The Dow fell as much as 84 points in morning trading but ended with a gain of 21.05 points at 14,839.80. That’s an increase of 0.1 percent.

The S&P has now climbed for six months in a row. That’s the longest stretch of gains since a seven-month run that started in March 2009, when the market hit a financial crisis low, and ended in October 2009.

In other news:

PFIZER: It dropped 4 percent after the drug maker’s results fell short of what analysts had expected. Falling sales of Lipitor, its cholesterol drug, crimped revenue. The world’s second-largest drug maker also cut its profit forecast for the rest of the year. Pfizer lost $1.36 to $29.07.

PITNEY BOWES: It sank 16 percent after the maker of mailing equipment and software cut its dividend in half and posted a 58 percent drop in net income. Pitney Bowes sank $2.53 to $13.67.

AVON: Its quarterly loss wasn’t as deep as analysts had expected. The direct-seller of cosmetics has been cutting staff and scaling back operations in an effort to turn around its business. Avon’s stock rose 92 cents to $23.16, a gain of 4 percent.

US STEEL: It lost $73 million in the first quarter because of tough competition and rising prices, more than twice as much as Wall Street expected. A year ago it made money in its flat-rolled steel segment, but that was a money-loser in the most recent quarter. Production costs rose, but selling prices didn’t.

BP: Its sale of its Russian joint venture helped it more than triple first-quarter profits, the oil company said in a further sign that its disposal program in the wake of the Gulf of Mexico oil disaster is on track.

AB INBEV: Anheuser-Busch InBev NV, the world’s largest brewer, says that its profits rose in the first quarter in spite of falling sale volumes in important markets.

BEST BUY: It is selling its stake in its European joint venture to partner Carphone Warehouse Group PLC in a cash-and-stock deal valued at about $775 million.