Self-made millionaire: This is the formula for happiness

Scott Galloway says depression in your 30s is common — happiness is just around the corner

What if you discovered a secret formula for being happy? Such a thing does exist, according to Scott Galloway, a successful serial entrepreneur and marketing guru who is a professor at New York University's Stern School of Business.

When looking for "the equation for life well lived," Galloway describes something that he calls the "algebra of happiness." The basic idea is that the average person's happiness can be mapped: There's a fair amount of happiness early in life, followed by a period of stress in middle-age, before happiness finally spikes again later in life, assuming you're able to properly appreciate everything you have and have experienced.

"Science shows there is an arc to happiness. Specifically, it looks like a smile," Galloway tells CNBC Make It. "So, your younger years, your childhood, your teens, your college years [and] young adulthood are the stuff of college football games, time with friends, sexual exploration, experimentation — a lot of great stuff. And, you're taught that the world is yours for the taking and you believe it.

"Then, about your late 20s, early 30s, s--- gets real."

It's around this time in your life that life tends to become more stressful, with your career and relationships likely taking on added elements of gravity and responsibility, says Galloway, whose own career has involved founding multiple companies of his own as well as serving on the boards of companies such as Eddie Bauer, Urban Outfitters and The New York Times Company.

As you age into your 30s, you may be reaching the point where the grand dreams of your youth may begin to be dimmed, somewhat, by the harsh realities of the world. "You may come to the recognition that you're not going to be a US Senator or have a fragrance named after you," Galloway says. "And the stress of life, and also living up to the expectations you've set for yourself, gets, quite frankly, stressful and sometimes disappointing."

But, don't worry. It gets better. "Then something wonderful happens in your late 40s and early 50s," Galloway continues. "And that is you take stock of your life. And, if you were born in America and are fortunate enough to have an education and a good job, you start to take stock of your blessings."

Those blessings might include your family, including children — "these smaller things that look, smell and feel like you that are joyous," Galloway says.

As you get older, you begin to fully realize and appreciate how fortunate you are, Galloway says. "You also recognize that our time here is finite and begin just naturally starting to appreciate each day-by-day, and you get happier," he says.

The most important takeaway from Galloway's algebra of happiness, he says, is the fact that older generations are typically the happiest demographic, even in spite of the fact that their health might be declining. In other words, be patient in the search for happiness and remember to appreciate what you have — especially when you're stressed out.

"The message to young people is the following: if you find yourself in your 30s stressed out, maybe disappointed at times, that's natural," he says. "Happiness is there and it's waiting for you."

Don't Miss:

Self-made millionaire: 3 things you need to do to be successful, happy and wealthy by age 30

This former Google X exec reverse engineered happiness — here's what he found

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

Scott Galloway: If you want lasting happiness do these 3 things by the time you hit 30