SAN JOSE, Calif. -- $2.5 billion is a lot of money, and it's the low end of what Apple says Samsung should pay for selling products that look and feel like the iPhone and iPad.

But just how did Apple reach that tally?

To explain, Apple today called on Terry Musika, a certified public accountant who has been involved with more than 200 intellectual property cases, including this one between the two tech giants.

In short, it's complicated.

"The calculation had to be done on a phone by phone, tablet by tablet basis," Musika said. "Each phone, each tablet, deserves or gets its own damage. That calculation had to be done on each of those products."

To add to the complexity, Apple has targeted a string of Samsung devices released at different points in time. While some of these are accused of the same things, others were only infringing on certain patents. Also, some patents were still pending, and some allegedly infringing features were added later.

All the data comes from Samsung's own sales numbers for smartphones and tablets, which were unearthed earlier this month. Musika also cross-referenced that information with market share data from both companies as tallied by research firm IDC.

When it actually came time to crunch the numbers, Musika says he formed a team of 20 people comprising programmers, statisticians, and CPAs to create a computer program. That group spent about 7,000 hours working on the tally, which cost $1.75 million.

"I can assure you, it's not me sitting at a desk with a calculator, doing calculations," Musika joked.

The end result is Apple's $2.5 billion number, which could shift all the way up to $2.75 billion on its high end. During his testimony, Musika went through how this calculation included reductions from ineligible sales, and costs. Per patent, which Apple is accusing Samsung of infringing, that works out like this in terms of the royalties Apple thinks it would have, and should have been paid:

Josh Lowensohn/CNET

The damages tally is especially important given that U.S. District Judge Lucy Koh, who is presiding over the case, has the power to triple it if she rules that Samsung willfully infringed on Apple's patents. That could happen as early as next week, when both sides are scheduled to make their closing arguments and the jury heads into deliberations.

In the meantime, the trial continues through the rest of this week. Apple is expected to rest its case today, with Samsung to take the offensive with its own set of witnesses.

About the author

Josh Lowensohn joined CNET in 2006 and now covers Apple. Before that, Josh wrote about everything from new Web start-ups, to remote-controlled robots that watch your house. Prior to joining CNET, Josh covered breaking video game news, as well as reviewing game software. His current console favorite is the Xbox 360.
See full bio