WASHINGTON — The final tab for special counsel Robert Mueller's investigation into Russian election interference and President Donald Trump has come to just under $32 million over two years, officials said Friday.

The latest figures calculate costs incurred by the investigation from October 2018 until May, when Mueller's office effectively closed, having issued a final report.

In that time frame, Mueller's office spent about $4.1 million, while Justice Department components spent an additional $2.4 million on work attributable to his investigation.

That brought the total cost of Mueller's work since it began in May 2017 to about $31.6 million. Throughout the investigation, the largest expense was paying Mueller's staff salaries and benefits, according to the documents.

The cost of the special counsel investigation comes with a steep discount, because former Trump campaign chairman Paul Manafort was convicted of financial crimes that carry fine and forfeiture penalties that add up to about $16 million for the government — or more than half of the entire cost of Mueller's work.

Trump has repeatedly complained about the cost of the investigation, but analysts say his budget is not out of line with previous independent counsels. Former independent counsel Kenneth Starr, for example, spent more than $52 million investigating President Bill Clinton, and the five independent counsels appointed to look into various Clinton-related matters during the 1990s spent more than $100 million.

Funding for Mueller's office came directly from an indefinite appropriation for independent counsels.

Mueller testified to Congress last month about his findings. In a 448-page report, Mueller concluded there was not sufficient evidence to charge any Americans with conspiring with Russia to interfere in the 2016 election.

He also declined to make any determination about whether the president had tried to obstruct justice, but also said the findings did not exonerate the president.

The Mueller investigation led to charges against 34 people, including 26 Russian nationals, and secured guilty pleas from seven, including several high-level Trump campaign and administration officials.