US president Donald Trump flew to more than 40 political rallies in the months leading up to the 2018 mid-term elections, to coax his loyal fans to come out to the polls for Republican candidates. A Quartz analysis of Trump’s travel schedule and the latest Department of Defense operating figures for Air Force One aircraft suggests the tab for the air travel alone was $17 million.

The costs so far have been borne almost completely by US taxpayers.

How much of the estimated $17 million bill taxpayers will ultimately eat is still unclear. When presidents use Air Force One for campaign purposes, their political party or reelection campaign is supposed to cover a portion of the astronomical operating costs, according to Federal Election Commission rules. The Trump campaign reimbursed the Treasury roughly $112,000 for air travel in March and April. There has been no paperwork filed for any similar reimbursements since then.

The specially equipped Boeing 747 jet that the president travels on most often costs $142,380 per hour to operate, including fuel, onboard supplies, and engine and aircraft maintenance. A smaller Boeing 757 that’s used when the president is landing on shorter runways costs $35,641 an hour to operate, the US Air Force says.

In most instances, Trump traveled from the White House to Joint Base Andrews, the nearby military installation where the planes are kept, aboard the presidential helicopter known as “Marine One,” which flies with two to four other identical decoy aircraft. Using three aircraft would add up to $14,406 per 10-minute, one-way trip, based on the Defense Department’s latest hourly operating rates of $28,812 for the VH-3D helicopter. You can see the entire breakdown of Trump’s rallies, flights, estimated costs, and the candidate he was supporting on each trip, in Quartz’s spreadsheet here.

US taxpayers also paid unknown amounts for Secret Service and support staff that accompanied Trump to the rallies, while Trump’s 2020 reelection campaign and its affiliated committees separately paid tens of thousands of dollars in rental fees and private security costs.

The White House mapped an unusual strategy of putting Trump on stage this summer, despite a pile-up of negative news as special counsel Robert Mueller’s investigation escalated, and as administration officials were accused of misusing public funds. Trump crisscrossed the eastern and midwestern US from March 10 until a final rally for the Mississippi runoff election on Nov. 26, making multiple stops for some Republican candidates and ramping up angry, anti-immigrant, anti-press rhetoric on the way.

When then-president Barack Obama used Air Force One to fly with Hillary Clinton to a July 2016 campaign rally in North Carolina, the Clinton campaign reimbursed the US government $37,000 for the trip. Trump was an outspoken critic of the practice then.

So far neither the White House nor the Republican National Committee (RNC) has indicated how much of Trump’s campaign travel costs have been paid back, or when they might be. Their share is based on the fair market cost of a charter flight to the same destination on an aircraft of similar size, divided by the number of so-called “campaign travelers” on the plane.

Jessica Ditto, the White House spokesperson who handled questions about Trump’s campaign rallies this summer, referred all inquiries to the president’s re-election campaign, which didn’t respond to any questions. The RNC press office said someone would answer emailed questions, but there was no response to multiple requests over several days.

According to FEC filings, the Trump 2020 presidential campaign committee has made eight payments to the US Treasury marked “TRAVEL EXPENSES: AIR,” for a total of $112,667.90 since the rallies started in March. The first payment is dated March 12, 2018; the most recent disbursement is dated April 13. That means US taxpayers may have so far been reimbursed for about 0.7% of the cost of the president’s flights to political rallies, presuming the payments indeed relate to the midterm events.

It’s not unusual for a president to use Air Force One to fly to campaign events for other members of his political party, campaign finance watchdogs say. But “the general rule is the campaign or party has to reimburse the White House for the cost of the political portion of the trip,” says Brendan Fischer, the director of federal reform for the Campaign Legal Center, a nonpartisan watchdog group on campaign ethics and finance issues.

The White House and the president’s party are supposed to figure out a formula and policy that makes sure that US taxpayer money is not being used to subsidize political travel.

“It is particularly difficult with Trump,” though, Fischer says, because the president can turn an “official” event into a “political” event unexpectedly. “He goes off script, and what’s supposed to be about policy and the White House agenda can be a political event” in which Trump “starts talking about elections, or electing more Republicans,” Fischer says. In those cases, US taxpayers should be reimbursed for the travel, he adds.

Donald J. Trump for President, Inc., the official name of Trump’s reelection campaign, did pay directly for some of the “Make America Great Again” rally costs including facility fees, private security costs, and TelePrompter rental fees, per Federal Election Commission data.

A $1.3 million flight to Las Vegas

Trump’s most expensive rally to fly to was a $1.3 million trip to Las Vegas, where he stumped for Dean Heller, the Republican incumbent for senator, on June 23. He spent another $650,000 traveling to Las Vegas again on Sept. 20. Heller was defeated by Democratic challenger Jacky Rosen, a former synagogue president who captured 50.8% of the vote to Heller’s 45%.

The second-most expensive single trip, based on estimated flight costs, was a $1.2 million trip on July 5 for Montana’s Matt Rosendale. Trump held a second rally for Rosendale on Sept. 6 that cost an estimated $550,000 in air travel, and a third rally on Oct. 18 that racked up an estimated $940,000. Rosendale was defeated by incumbent Jon Tester 50.1% to 47%.

Trump also held four different rallies for Mike Braun, the Indiana candidate for Senate, for a total travel cost of about $600,000. Braun defeated his Democratic incumbent Joe Donnelly.

The MAGA midterm strategy

About a third of the people who attend Trump rallies are not registered Republicans, White House aides estimated earlier this year. Part of the White House’s stated strategy was to get these loyal Trump fans to pull the lever for GOP candidates on Nov. 6.

While the White House pledged soon after Trump was inaugurated that the president would not be using Air Force One at rallies “in the background as a prop,” the aircraft featured prominently in the recent rallies, to the delight of attendees. The location of a Montana rally in October was even changed so that Air Force One could fit in the background, rally organizers told the Montana Standard.

Whether the packed schedule of MAGA rallies actually helped the Republican Party overall is a matter of debate. Just about half of the candidates that Trump personally endorsed went on to win their midterm races, and the Democrats gained control of the House of Representatives by flipping nearly 40 seats there. In Montana, Trump’s appearance at local rallies actually appeared to have boosted turnout for Democrats instead; they turned out in greater numbers than in the 2016 presidential election to defend Tester, the incumbent Democrat.

Trump 2020 in full swing

As with Obama, former US presidents George W. Bush and Bill Clinton waited more than two years into their first terms before filing paperwork to run for reelection. But Trump filed the day he was inaugurated, on Jan. 20, 2017. The rallies are also part of his focus on being reelected in 2020, Republican strategists say.

The Trump campaign took in more than $18 million between July 1 and Sept. 30; of that amount, roughly $2.9 million, or 16%, came from individual donations of $200 or less. According to FEC filings, Trump himself did not donate any money to his own campaign during 2017, nor during the first three quarters of 2018.

Looking for more in-depth coverage from Quartz? Become a member to read our premium content and master your understanding of the global economy.