Transcript for New book uses an engineering approach to find happiness
the code called "Solve for happy" and written by the engineer who runs Google's dream factory. Mo gawdat was inspired by tragedy to find joy and talked about what he learned with Nick watt. ??? I'm happy ??? ??? clap along if you feel ??? Reporter: Pharrell sings about it and kids just exude it. Are you happy? All: Yes. Reporter: Kid, why can't we all be like that? Meet a man with a mission to make it so. I'm dedicating six months of my life completely to this mission of making 10 million people happy. Reporter: Yep, he wants to make 10 million of us happy. Seriously. Mo gawdat has taken sabbatical from his free thinking gig at googlex, just wrote this book inspired by the loss of his teenage son Ali. There is nothing I can do to change this. But I could turn that thought in my head and make myself miserable. Reporter: He chose to be happy, a choice he says we all have. Happiness is always there inside. Children are the happiest. Reporter: What is the number one thing you think you would need when you're a grown-up for you to be happy? Family. Why are you happy. I'm happy because I get to play with my friends. Some grown-ups are grumpy. Do you agree in yes. Reporter: He spent 12 years decoding happiness using his engineering techny know-how and an actual formula. A real equation. Happiness can follow a very simple equation. Every time you've ever felt happy in your life it was a moment when you felt that life was meeting your expectations. Reporter: Rule number one to make that happy. Don't sweat the small stuff. You know what, life is okay. Reporter: For "Good morning America," Nick watt, ABC news, St. Joseph elementary mountain view, California. That was a Greece piece. I got to read that book. I got to read it too. Counts more people to add to the 10 million. You can always adjust your expectations. When you're able to choose happiness. Sometimes I have a said that and people say, oh, because of clinical things or whatever. But if you are all things considered you can choose happiness. Yep. And this is what he's talking about. The book "Solve for happy" is out right now.
This transcript has been automatically generated and may not be 100% accurate.