MINNEAPOLIS (WCCO) — At one point Tuesday afternoon, Minnesotans were buying $97 worth of Mega Millions lottery tickets per second.

That’s a lot of money, and not all of it will go to the winner.

READ MORE: NFL Week 13 AFC East Preview: CBS Boston's Levan Reid Calls AFC East Title Fight A Battle Of 'Big Brother Vs Little Brother'

Since Minnesota introduced the lottery almost 30 years ago, the games have brought in almost $3 billion for the state. So, after the prize is given out where does rest of the lottery money go? Good Question.

Just 20 minutes at the New Brighton Shell helps you understand how we got here.

“Tonight is the drawing for the largest lotto payout in U.S. history,” Robert Doty with the Minnesota State Lottery said. “This is awesome, it’s very cool. It’s all people are talking about.”

Related: Minnesotans Line Up For Chance At Largest Jackpot In Lottery History

Robert Doty is the Minnesota Lottery executive director.

“The bigger the jackpot, the more excitement, the more money in the state’s coffers,” Doty said. “In every state, every lottery has some worthy cause they’re giving to.”

READ MORE: SportsLine Week 13 AFC West Picks: 'Denver Designed Well To Stop What Kansas City Does,' Says Larry Hartstein

So let’s break that down using one $2 Mega Millions ticket. $1.24 goes towards the prizes, 15 cents to administrators and game expenses, 12 cents to the retailers and what’s left to the state.

By Minnesota law, a little more than half goes to the general fund, and the rest towards wildlife and the environment.

“These environmental programs, what are they? These are programs that, first of all, wouldn’t get funding,” Doty said. “Clean air, clean water. We just looked at a study on bison, pollination of bees.”

Since mid-August, $11 million has gone into Minnesota coffers from Mega Millions and Powerball.

“So it’s like you’re doing a good deed? Absolutely, and if I could get something out of it even better,” Doty said.

“Who do you think the biggest winner is in all of this? The ones taking all of our taxes,” Doty said.

Right off the top, the federal government takes 24 percent, $217 million, and the state gets a cut. If it’s a Minnesota winner, that’s 7.25 percent, or $65 million. Also given that you’ll move to a higher tax bracket, count on another several million in taxes.

MORE NEWS: Kim Potter Trial, Dec. 3 Live Updates: All 14 Jurors Selected, Opening Statements Planned For Wednesday

Lots of states use their lottery money for education. In Wisconsin, it’s used for property tax credits.

Heather Brown