IBM posted first-quarter revenue of $24.7 billion and net earnings of $3.1 billion as the technology and consulting company benefited from strong demand for software services.

International Business Machines, which has been shifting its focus from hardware to higher-margin services and software over the past decade, said on Tuesday that earnings per share, excluding items, was $2.78 -- beating average analysts' earnings per share estimates of $2.65 and in line with revenue expectations of $24.78 billion.

(Reporting By Nicola Leske; Editing by Bernard Orr)