Warren Buffett looks at his offer to pay $1 billion to anyone who fills out a perfect NCAA tournament bracket as nothing more than a matter of having the numbers in his favor.

Mathematicians agree.

But that hasn’t stopped them from building a cottage industry by teaching bracket-fillers how to make the impossible seem possible — or a little less improbable.

About a half-dozen college professors are offering special classes to teach people the ins and outs of the numbers that will, inevitably, work against them. And there’s one website — takebuffettsbillion.com — that says it will send a unique, statistician-crunched bracket to anyone who signs up, with the promise that all those in on the gig will split the money if one of those brackets is the winner. (As of yesterday, about 9,000 people had signed up.)

“I’d love to demystify all this,” said DePaul math professor Jeff Bergen, whose expertise has been in demand this month. “The math involved is quite simple and can be done in a high-school class. What blows people away is the magnitude of the numbers. You look at the number 9 quintillion, and it’s hard to wrap your head around it.”

There are a few more than 9.2 quintillion combinations for a 64-team bracket. A quintillion is 1 million times 1 trillion — a 1 with 18 zeros behind it.

To help whittle the odds, math professor Tim Chartier of Davidson College held a seminar. For $100 a head, he offered a class last week touted as 90 minutes in which you could “learn how to craft an NCAA basketball tournament bracket from a master, and let mathematics boost your chances of creating the perfect bracket.”

Over the past few years, Chartier’s system has helped a handful of Davidson students finish in the top 2 or 3 percent in different contests, including one run by ESPN, which gets more than 1 million entries. His system weighs a number of variables, including records, strength of schedule and, most notably, how teams are currently playing.

At St. Joseph’s, alumnus Joe Lunardi, who is widely credited with creating the “science” of bracketology, offered a $99 course in which he shared some of his trade secrets. The final exam involved filling in the names of the teams on a mock bracket.

The University of Cincinnati business school offers a class that meets three Saturdays before Selection Sunday. Professor Mike Magazine teaches the history of the NCAA tournament and how to go through probabilities and game simulations to come up with a winning bracket.

Buffett’s contest is capped at 15 million entrants, so, Bergen said, if all 15 million sign up and they all have some knowledge of basketball, the odds are still 8,500-1 against a perfect bracket. That’s more than a 99.99 percent chance that everyone will get at least one game wrong.

Bergen said you’d have a better chance of buying one Mega Millions ticket and one Powerball ticket and winning both in the same week.