We research all brands listed and may earn a fee from our partners. Research and financial considerations may influence how brands are displayed. Not all brands are included. Learn more.

Money is not a client of any investment adviser featured on this page. The information provided on this page is for educational purposes only and is not intended as investment advice. Money does not offer advisory services.

Andrew Caballero-Reynolds—AFP/Getty Images

It doesn’t seem like much—spending, say, $20 for a ride home on Uber or Lyft after a long night out.

But like your morning coffee fix or that weekly trip to the salon, it can add up. (Really, really add up.)

For the average 20-something, the 25-year cost of those Uber rides is an eye-popping $323,190, according to a new analysis by investment platform Betterment. In other words, if you just skipped the Uber or Lyft ride and invested that money instead, you’d be well on your way to a decent retirement stash.

Americans who use ride-sharing apps spend just over $4,000 a year on them, Credit Karma estimates, based on an average Lyft and Uber ride charge of about $22 and assuming three to four trips per week—an assumption based on data from the U.S. Department of Transportation's National Household Travel Survey and American Automobile Association's American Driving Survey.

Betterment took that estimate and calculated the long-term investment returns for a millennial on what should be a fairly aggressive portfolio, invested 90% in stocks and 10% in bonds and earning about 8% return over time.(The returns on a more moderate portfolio—a 60/40 split, for example—would be just under $235,000 for the same period.)

That's much more than you'd get by giving up that morning cup of coffee from Starbucks, Betterment found, which would deliver only about $87,000 for millennials who invest that money instead. The weekly mani-pedi appointment? Over the course of 25 years, that’s worth $107,000.

You don't need to give up all of life's small pleasures, says Nick Holeman, a financial advisor at Betterment, as long as you're meeting your saving and retirement goals.

“As long as you have concrete goals and you’re saving enough to reach them, that’s what’s most important,” he says. A better approach, Holeman says: Create the savings goal, meet it, and then don’t sweat the small stuff.

If you’re not meeting your savings goals, then you do need to take a deeper dive into your finances. “Keep a budget for one to three months,” Holeman recommends, saying it can be insightful to figure out how much you’re really spending on things like Ubers.