Save and Invest

This mental trick is the key to saving money, say 2 millennials who retired with millions

After seven years of working in the corporate world, one New York City-based millennial saved up $2.25 million, which was enough for her to quit her job and settle down at age 28.

She goes by the pen name J.P. Livingston on her blog The Money Habit, where she discusses her journey to financial independence and what it really takes to build wealth.

Livingston made a lot of money when she was working: mid-six figures a year, by the end of her career. She also used a variety of strategies to save big over the years, such as tracking her spending and automating her savings.

One mental trick made the biggest difference, though, she tells CNBC Make It: Thinking about purchases in terms of cost per hour.

"To achieve a high savings rate, start viewing your purchases in terms of units of your time rather than dollars," she says. "So instead of saying a new unlocked iPhone costs $800, you might do the math to figure out it would cost you 60 hours of work, or a week and a half of your life."

Thinking that way helps you truly understand the trade-offs.

"This is great for big purchases," says Livingston. "To buy a home with an extra bedroom or one with fancier finishings might cost you $50,000 or $100,000. Is that worth working three extra years to you?"

It's a concept she first learned about in Vicki Robin and Joe Dominguez's "Your Money or Your Life," a personal finance classic endorsed by other young self-made millionaires, including Grant Sabatier, 34, who calls it "the best book on money, period."

"To achieve a high savings rate, start viewing your purchases in terms of units of your time rather than dollars." -J.P. Livingston, blogger, The Money Habit

Sabatier, who went from $2 in his bank account to $1 million in five years, says the book had a similar effect on him: Ultimately, it changed his relationship with money and his approach to spending and saving.

"The premise of it is that you exchange your time for money," he tells Make It. "And when you start thinking about how many hours of your life it took to save up the money to buy something, you really start thinking twice about your purchases."

For example, "say I work eight hours a day and after taxes, make $10 an hour, meaning I'm earning $80 a day. I want to go out for a nice dinner on Friday and that costs about $80, meaning I spent an entire day of my life working for this meal.

"And then you start thinking about even larger purchases, like a $1,000 TV, and you think, 'How much of my life did I trade for this? Is it worth it?'"

The mental trick helped Sabatier up his savings rate to about 80 percent, he says, and build a $1.2 million portfolio from nothing in five years.

Don't miss: 5 rich NFL stars who live like they're broke

Like this story? Subscribe to CNBC Make It on YouTube!