Software faults could be costing the European Union, whose 15 member states have a combined gross domestic product (GDP) slightly less than the US GDP almost as much again.
The US study, by the National Institute of Standards and Technology (NIST), said that testing could reduce the cost of bugs by about a third but would not eliminate all software errors.
The findings were released in a 309-page study released this week. There are very few markets where "buyers are willing to accept products that they know are going to malfunction", said Gregory Tassey, the NIST senior economist who headed the study. "But software is at the extreme end, in terms of errors or bugs that are in the typical product when it is sold."
A product of 18 months of research that included extensive feedback from end users, the study examined the impact of buggy software in major industries - automotive, aerospace and financial services - and then extrapolated the results for the US economy.
One case study in the automotive and aerospace industries involved interviews with 10 software developers and 179 users of computer-aided design, manufacturing and engineering systems and product data management software.
It found that users of these software design tools spent significant resources responding to software errors. Approximately 60% of those surveyed said they had experienced "significant software errors" in the previous year. The total cost in these sectors from inadequate software testing was estimated to be £1.2bn.
Similar results were found in the financial services sector, where the total cost on financial services from inadequate software testing was estimated at £2.2bn.
"No one thinks you can get all the errors out of software," said Tassey. Vendors are under pressure to get products to market quickly, and there are diminishing returns on testing. The more effort you put into it, the fewer the bugs that are found.
"However, the general consensus seems to be [that] the existing state of the art with respect to testing is poor and can be sufficiently improved," he said.
The study called for the development of testing standards and said current testing tools were "still fairly primitive".
The study also said that standardised testing tools, scripts, reference data and metrics, among other things, "that have undergone a rigorous certification process would have a large impact on the inadequacies" now found.