The spending represents almost two-thirds of HMRC's spending on its transformation programme, designed to deliver a more efficient tax service and raise collection rates for the chancellor.
As part of its attempt to cut its technology costs by 10% by 2010-11, HMRC revised its "Aspire" contract with Capgemini at the end of last year. In return, the supplier was given a three-year contract extension, taking the deal to 2017.
Under the revised deal, Capgemini has agreed to deliver guaranteed savings of £658m by the end of the contract, says the NAO report.
Overall, the report says, HMRC spent £851m on transformation costs in the first 18 months of the programme, and achieved estimated savings of £2.4bn.
The NAO points out, however, that most of these savings were achieved as a result of activities already under way when the programme began.
Over the life of the programme, HMRC expects most benefits to come from an increased tax yield, estimated at £6.3bn, and from transaction savings of £4.1bn.
Tim Burr, head of the National Audit Office, said, "This is an ambitious programme of change with the potential to provide significant benefits in terms of tax yield and improvements for the department's customers.
"To succeed, the department must determine what it expects the programme to achieve with the resources available. It should also establish that the planned benefits are realistic and confirm each year that those achieved are robust."