As it turns out, the charitable contributions that Mr. Buffett did deduct from his income make up just a tiny portion of the more than $2.85 billion he donated to charity last year, he said. The reason is that the tax code limits the amount that an individual can claim in charitable deductions. Mr. Buffett, 86, has pledged to give most of his $65 billion fortune away.

By contrast, Mr. Trump’s own charitable foundations — and his claims about his personal contributions — have come under scrutiny. Last week the New York attorney general ordered the Donald J. Trump Foundation to stop soliciting donations in the state because it lacked the required registration. And many of the donations that Mr. Trump had publicly boasted of turned out to have come from other people’s pockets, like those who had given money to the Trump Foundation.

Three pages of Mr. Trump’s income tax returns from 1995 obtained by The New York Times show that he claimed $916 million in losses.

Mr. Trump has repeatedly refused to release his federal income tax returns, defying the practice of presidential candidates going back four decades. He and his campaign have offered varying reasons, but the excuse most frequently invoked is that he is under audit by the Internal Revenue Service. The I.R.S. said that an audit does not prevent Mr. Trump from making his returns public.

Mr. Buffett made the same point. “I have been audited by the I.R.S. multiple times and am currently being audited,” he wrote in the letter. “I have no problem in releasing my tax information while under audit. Neither would Mr. Trump — at least he would have no legal problem.”

The Trump campaign had no comment on Mr. Buffett’s letter.

Mr. Buffett’s tax strategies were drawn into the debate when Mr. Trump blamed Mrs. Clinton for not doing more when she was a senator to fix the tax code and close loopholes that favored Wall Street and wealthy campaign donors. Mrs. Clinton, who has pledged to raise taxes on rich Americans, while Mr. Trump’s plans would sharply reduce them, responded that a Republican-controlled Congress had repeatedly blocked such efforts.

Mr. Buffett declined to comment further on his letter. George Soros, another billionaire entrepreneur who has supported the Clinton campaign, was also singled out by Mr. Trump for claiming outsize deductions of $1.5 billion on his taxes. A spokesman for Mr. Soros, Michael Vachon, said he had no comment.