Computer Sciences (CSC) turned a profit in the fourth quarter despite missing revenue estimates, as lower operating costs and a tax benefit boosted the technology services company.

The Falls Church, Va.-based company reported a $281 million profit, or $1.81 a share, after posting a loss of $158 million, or $1.02 a share, in the year-ago period. Adjusted per-share earnings, which exclude a tax benefit, restructuring charges and other one-time items, checked in at $1.27 to beat the company’s own projection of 83 cents to $1.03.

Revenue slipped 7.3% to $3.7 billion, missing Wall Street expectations for $3.85 billion. Total costs and expenses fell 14% year-over-year.

The fourth-quarter profit comes amid a dispute over a contract for Computer Sciences to provide electronic patient records for Britain’s National Health Service, while the company has also dealt with lower government spending.

In the latest period, the company’s managed-services business saw its revenue decline 4.3% to $1.63 billion. Revenue from business solutions and services fell 12%, following the sale of an Australian IT-staffing business.

Computer Sciences’ North American public-sector unit posted a 6.8% drop in revenue, as some contracts neared completion and new contracts were scarce.

Computer Sciences has begun to focus more on services like cybersecurity and cloud computing. It recently sold its credit-services segment for $1 billion and its enterprise-systems integration unit for $90 million.

Shares edged 10 cents lower to $40.39 in early morning trading Wednesday, while the stock has climbed about 23.5% on the year.

Follow Matthew Rocco on Twitter @MatthewRocco