Thomas Donohue, second from left, president of the U.S. Chamber of Commerce, speaks during a House Ways and Means Committee hearing Wednesday in Washington. (Anna Moneymaker/Bloomberg News)

Virtually everyone on Capitol Hill and in the White House seems to agree that the nation’s infrastructure needs immediate federal investment, and on Wednesday the call in the House and Senate was renewed: Figure out how to pay for it.

“Everything is on the table,” Rep. Sam Graves (Mo.), the ranking Republican on the House Transportation and Infrastructure Committee, said in testimony before the House Ways and Means Committee, which holds the purse strings for anything his committee might approve. “We are open to whatever you all put forth.”

However, “it’s going to take political capital to get something done,” Graves noted — capital that could risk alienating voters.

On the opposite side of the Capitol, the Senate Environment and Public Works Committee held its own hearing on the benefits of “Highway Infrastructure Investment and Accelerated Project Delivery” — a title that prompted Sen. Thomas R. Carper (D-Del.) to quip that “the number one way to accelerate new projects is to pay for them.”

The general agreement was that the first step in raising money for infrastructure should be to raise the federal tax on gasoline and diesel, giving way to a system that eventually would impose a tax on vehicle miles traveled, a bow in thinking to fuel economies and hybrid or electric-powered vehicles.

Rep. Peter A. DeFazio (D-Ore.), chairman of the House Transportation Committee, emphasized to the Ways and Means Committee that the fuel tax has not been raised since 1993.

“We’re borrowing $16 billion a year to backfill the Highway Trust Fund,” DeFazio said, referring to the fund into which fuel tax flows. “Way more than half the states have raised their gas tax, and no one’s lost their election over it.”

Lawmakers on both sides of the aisle seemed ready to put their weight behind President Trump’s call for infrastructure investment.

“We saw the president urging Congress to send him bipartisan legislation that he could sign, and I think, more importantly, that all of our constituents want this as well,” Graves said.

He agreed that a gas tax is not a long-term solution.

Both the House and Senate committees heard from advocates, who underscored the need for infrastructure investment.

Gregory E. DiLoreto, former president of the American Society of Civil Engineers, said that the cumulative grade for U.S. infrastructure, based on the ASCE’s annual reports, is a D+.

DiLoreto said that more than 44 percent of the nation’s roads are in poor or mediocre condition.

The Highway Trust Fund is “facing an urgent and dire funding cliff that needs immediate attention,” said AFL-CIO President Richard Trumka.

“After all the studies outlining this crisis, no meaningful action has been taken to correct decades of chronic underinvestment,” he said.

Thomas Donohue, president of the U.S. Chamber of Commerce, proposed raising the federal fuel tax by 25 cents.

“I want to talk about the elephant in the room, the gas tax,” Donohue said. “How many people in this room can live off the same paycheck they did in 1993? No one. Our nation’s roads and bridges and transit systems can’t either.”