A record 55 percent of millennial parents have had children before getting married — compared to 25 percent of the youngest baby boomers who did the same — and the trend could be costing them.

That's according to a new analysis of Bureau of Labor Statistics' Panel data by the American Enterprise Institute (AEI) and the Institute for Family Studies (IFS), which found that "the most financially successful young adults today continue to be those who put marriage before the baby carriage."

Specifically, 86 percent of young people who got married before having kids are among the middle or top third of earners. Just 53 percent who put childbearing first have incomes in the middle or top third, meaning 47 percent of millennials who have a baby first are considered lower income.

"Even millennials from low-income families are more likely to flourish if they married before having children: 71 percent who married before having children made it into the middle or higher end of the income distribution by the time they are age 28 to 34," the AEI and IFS report.

"By comparison, only 41 percent of millennials from lower-income families who had children first made it into the middle or higher end of the distribution when they reached ages 28 to 34."