While there's plenty of data revealing how pricey childcare can be, there's never been a way to calculate exactly how much potential income parents stand to lose over a lifetime if they choose to leave the workforce. Until now.

Enter Michael Madowitz, an economist at the Center for American Progress. He and his team at the CAP designed a calculator that shows you how much money you'll be walking away from if you quit your job to save on childcare costs.

Monkey Business Images / Shutterstock

Not only was Madowitz curious from an economist's standpoint, he was curious as a parent.

"When my wife and I were planning a family, we were trying to figure out if one of us should stay home," Madowitz told NBC News. "While we could easily figure out the cost that daycare would be, we couldn't figure out exactly what it would cost if I took a couple of years off."

Much like a retirement calculator, the CAP’s calculator factors in the basics such as your age, your salary, and the years you plan to leave the workforce. It also ties in average 401(k) contributions, expected wage growth, and the monetary penalties that may come with an interrupted career.

Let's Do the Math

Here’s an example: Let's say you're a 26-year-old woman who makes $60,000 a year and plans to take off five years. Over your lifetime, your total income loss will be $1,030,076. Because of the gender pay gap, if you're a 26-year-old-man making the same, you stand to lose a bit more: $1,204,194 over your life.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

The numbers may sound unrealistically high — but remember, this looks at lifetime income projections, not just year over year salary. Scott Dressler, an associate professor of economics at Villanova University, found that while the calculator does make some assumptions about raises and 401(k) accumulations, they are necessary in order for such a tool to work, and ultimately, the calculator is pretty accurate. And it makes a mighty point.

Related: 'Returnships' Help Stay-at-Home Parents Get Back to Work

"This calculator says, 'Look at all these long-term expenses built in to leaving the workforce. Even if you only made enough to cover childcare, you would still be better off working because then you wouldn't lose increases in wages and 401(k) contributions," said Dressler. "And it shows that if you don't have the money to pay for childcare, and so have to leave the workforce, these are all the costs you would incur doing that."

So childcare isn't really just $18,000 per year (what the CAP quoted as the national average for a family with a four-year-old and an infant) — it's potentially millions of dollars per stay-at-home parent.

Even Parents Who Work May Get Cornered Into Quitting

Holly Flanders, founder of Choice Parenting, and formerly a daycare director in Hoboken, New Jersey, has seen how childcare costs be "crippling" for many families.

"In my experience as both a director and childcare consultant, many [parents] would stay in the workforce to invest in their careers even if their entire paychecks went to childcare for two to three years, if it meant that their children were receiving high-quality care and education," said Flanders, who added that in Hoboken, the going rate for a high-quality daycare center is currently $2,325 a month. That's a lot of money to shell out; surely these kids are getting the most luxurious, customized care with the most trained childcare specialists? Well, not necessarily.

"Most daycares do not require daycare staff to have formal education in early childhood education and are paid a very low wage without full-time hours or benefits, which leads to high teacher turnover," Flanders told NBC News. "So when confronted with not just the cost but wanting to give their child the best care possible, many parents opt to stay home and be their child's caregiver as a superior alternative."

And if you have more than one infant or young toddler, the costs at a childcare center can be so high that it can be cheaper to hire a nanny.

"If you have more than one child under the age of three, you will most likely need to pay double the costs — and many daycares do not give a discount for multiples," added Flanders. "At that point, parents simply cannot pay daycare costs."

It Will Be Hard on Millennials

While some families may qualify for state aid, it’s tricky to get, and the weight of childcare costs remains disproportionately heavy on middle-class families. It's a burden that Madowitz sees having a particularly painful effect on millennial parents.

"The most frustrating part for me is seeing how the millennial generation goes through this," said Madowitz. "This is going to matter a lot for their lifetime earning potential. The fact that we're not in a position to get [a better] childcare system set up in time for them is potentially a very large missed opportunity."

What would a better childcare system look like? Ideally, in Madowitz's opinion, it would be an extension of the K-12 public schooling program.

"When your kid is five years old, they can go to school for free," noted Madowitz. "Perhaps we should not wait until they're five."