A friend of mine recently joked that if somebody was planning a $40,000 wedding (about average, by some accounts), “Paul Merriman would say: Have a $1,000 wedding and put the other $39,000 into a Roth IRA that earns 10% for 40 years. You’d never have to add another dime in order to retire.”

When I heard about this it got me to thinking. And calculating. It turns out my friend was righter than he realized.

I hope you won’t misinterpret that I’m against weddings or against marriage. Not at all.

But if a couple or their families really have $40,000 to spend on a wedding, is that the best use of that money? Wedding planners and the whole wedding industry may hate me, but I have to admit that I doubt that’s the best use of $40,000.

Let’s imagine for a moment what a bride could do with $39,000 starting at age 25. (I say bride instead of groom only because it’s long been traditional for a bride’s family to pay for a wedding.)

Assuming she has enough income to qualify for a Roth IRA, she could immediately contribute $6,000 (starting in 2019), letting that much of her $39,000 start growing tax-free.

She could put the rest into a taxable account, also earning 10%, and add another $6,000 to her IRA the following year. If the taxable account continues to grow at 10% and if she pays the taxes each year from separate funds, she will be able to keep funding the IRA for quite a few years, gradually getting all of it under that tax shelter.

I asked a colleague to help me do the math in order to see how this would work out for the bride who settled for a $1,000 wedding (which is still enough to host a modest party and pay a preacher).

Here’s what we found, assuming a 25-year-old bride who will retire at age 65:

Using an assumed annual investment return of 10%, which corresponds to the historical return (1970-2017) of a look-alike of a Vanguard target-date retirement fund, we calculate that her balance after 40 years, when she was 65, would be $1.77 million.

That is more than $45 for every dollar that was invested instead of being spent on a wedding.

If she continued to earn 7% in retirement and withdrew 4% of her account balance annually for retirement income, those cumulative withdrawals would amount to $3.21 million by the time she’s 95. All tax-free.

And at the age of 95, her Roth IRA would be worth $3.95 million.

Add the money she took out, and the total is $7.16 million, or a whopping $183 for every dollar that wasn’t spent on the wedding 70 years earlier.

Presumably this bride would have income along the way from which to fund a 401(k) or similar retirement savings account. The existence of the not-spent-on-the wedding money could supplement her retirement income and reduce the pressure on her to save as much as possible while she’s working.

However, she likely could do considerably better than that if she adopted the two-funds-for-life investment strategy that I recently proposed.

This strategy relies on a small-cap value fund to supplement a target-date fund, in order to boost returns while an investor is young. This “booster fund” is gradually phased out as the investor approaches retirement age.

With that one change to the assumptions we used before, we calculated that our bride’s Roth IRA would be worth $3.03 million when she was 65. Her cumulative retirement withdrawals over the next 30 years would total about $5.5 million.

And at age 95 the Roth IRA would have a value of nearly $6.8 million.

Add her cumulative withdrawals, and the total is $12.3 million, or nearly $315 for each dollar not spent on that long-ago wedding.

Now I realize that she paid a price for all this. She had to forego a razzle-dazzle wedding with all the trappings.

But what do you think she would say if she were asked, on her 95th birthday (or on any birthday after she retired) if she would give up the money in order to have had a bigger wedding? It’s an interesting question.

My wife told me in no uncertain terms that $1,000 is totally inadequate for a wedding in the 21st century, especially for a bride who has substantial financial resources available to her.

A wedding, she correctly pointed out, is more than just a party. It’s an opportunity for two families to meld together.

So how about the following: With a budget of $5,000, I think a 25-year-old bride could put on a respectable wedding — and still set aside $35,000 for her retirement and her legacy.

So here are the results, hypothetical of course, starting with a $35,000 investment.

Assuming the same compound rates of return, using a target-date fund she would have $1.58 million when she’s 65 (instead of $1.77 million). Her cumulative withdrawals over 30 years of retirement would be just under $2.9 million (instead of $3.21 million). And at age 95 her Roth IRA would be worth “only” $3.54 million (instead of $3.95 million).

The total of ending value plus retirement withdrawals would be $6.42 million (instead of $7.16 million).

Using my two-funds-for-life investment strategy and starting with $35,000, her account would be worth $2.72 million when she’s 65 and about $6.1 million at age 95. Her 30 years of annual retirement withdrawals would total $4.95 million, for a grand total of just over $11 million.

The “fly in the ointment” of all these numbers is that they don’t account for inflation, which is likely to continue. Based on actual inflation over the past 70 years, the lifetime total (in 2018 dollars) is likely to be somewhere in the ballpark of one-tenth the numbers cited here.

But that could still add up to a million-dollar lifetime gift.

Any way you slice and dice this, you can start to see the enormous opportunity cost of that fancy wedding over a lifetime — the lost opportunity for 70 years of investment returns.

There’s another bit of good news here.

Although most brides and their families don’t have the resources for a $40,000 wedding, many families could set aside $3,500 for a financial gift. Invested as I have described, that could turn into $100,000 or more (in real dollars, not inflated ones) over a long lifetime.

That would be one heck of a wedding present, one that deserves serious consideration.

*Richard Buck and Daryl Bahls contributed to this article*.