There’s an old joke in motorsports that goes: How do you become a millionaire racing? Start out a billionaire. The thing is, though, that might be changing in Formula 1.

There was a time when racing wasn’t expected to make any money. As an advertising exercise for an automaker, it would have made as much sense to ask if a racing team was profitable as it would to ask if a TV commercial was profitable. Automakers were, instead, supposed to race on Sunday and sell on Monday, as the saying goes.

Last year, however, it’s widely accepted that all of the F1 teams pretty much broke even and teams like Red Bull and Mercedes even made modest profits of $10-$20 million. That’s kind of stunning considering the fact that teams spend as much as $450 million per year on their operations.

Read Also: Silver Is The New Black As Mercedes Unveils W13 For The 2022 F1 Championship

That’s because not only are the cars and their drivers expensive, but they’re made by some of the best engineers on earth and the teams need a lot of staff to make a car competitive as well as go to races. Beyond that, there’s the simple expense of getting everyone and their tools and all of the infrastructure to every race in a year. It all adds up.

To pay for that, teams make money in a number of ways. Some sell other teams equipment, like engines, to other teams, some get money from their drivers, and there are prizes handed out every year from F1. The real moneymakers, though, are the sponsors who pay to be on the cars and the drivers’ racing suits.

For a Mercedes sponsor, not only does that mean being associated with a winning team, it also means a lot of air time. The Mercedes car is estimated to have been onscreen for 19 percent of the whole season last year. And that’s valuable.

That Formula 1 teams make money at all is kind of surprising, but $10-$20 million is a slim margin to be running, especially in a sport where there’s very little guarantee of success. That has always made me wonder why someone like Lawrence Stroll would be interested in buying a team – in his case, Aston Martin.

Those margins are set to rise, though. Now that the teams are being held to a cost cap of $145 million, the money that all teams are making will suddenly look like a huge profit, which probably explains why the sport looks so interesting to so many investors.