Mindy Kaling is opening up about her journey to motherhood.

In an interview with Marie Claire for the magazine's wellness issue, "The Mindy Project" actress and "Never Have I Ever" co-creator talked about becoming a mother in her late 30s.

"I waited until I had the means and that made all the difference," Kaling, 43, said. "The choice to have a child -- by yourself, on your own terms -- it was the best part of my life... It's the best thing that I hope women feel confident doing by themselves."

PHOTO: In this July 25, 2022, file photo, Mindy Kaling arrives at a premiere in Los Angeles.
Steve Granitz/FilmMagic via Getty Images, FILE
In this July 25, 2022, file photo, Mindy Kaling arrives at a premiere in Los Angeles.

Kaling, who is the mother to daughter Katherine, 4, and son Spencer, 1, has been open about motherhood, telling "GMA" in 2021 that being a mom makes her feel "happy and confident." But when it comes to having kids, it should be on a woman's terms, and she encouraged young women to freeze their eggs.

"I wish every 19-year-old girl would come home from college and that the gift -- instead of buying them jewelry or a vacation or whatever -- is that their parents would take them to freeze their eggs," Kaling said. "They could do that once and have all these eggs for them, for their futures... to focus in your 20s and 30s on your career, and yes, love, but to know that when you're emotionally ready, and, if you don't have a partner, you can still have children."

The actress, writer and comedian is known for her role as Kelly Kapoor in "The Office," where she also received credit as a writer on the show for several episodes in seasons one through eight. Since then, she's starred in several films and TV shows including "Inside Out," "A Wrinkle in Time" and "The Morning Show."

As a writer, she told Marie Claire that she has used her platform to put Indian women front and center to highlight their stories, including the topics of Indian families' obsession with success and elitism about schools. But one topic in particular that she's highlighting in the Indian culture is destigmatizing mental health, which she says was driven by the death of her mother, Swati Chokalingam, in 2012 to pancreatic cancer.

PHOTO: Mindy Kaling appears on the "Today" show on Aug. 9, 2022.
Nathan Congleton/NBC via Getty Images
Mindy Kaling appears on the "Today" show on Aug. 9, 2022.

"I can only describe it as just anguish for two years," said Kaling, who shared that she saw a therapist for one year to process the loss. "Ultimately, it's about efficiency. I think you can get things done more if you're able to talk to the right people about the things going on in your life. I remember thinking, 'This is extremely helpful, but this would have been helpful when I was younger, when I had issues...'"

Kaling explores themes of grief and shares a glimpse of her own story in her show, "Never Have I Ever."

"When [Devi] loses her father in the first season, the grief doesn't go away. He's always there. It's the same way I feel about my mom," Kaling said. "Losing my mom and then wanting to talk about it in a way that is not as sad as the experience of going through it, but being able to be like, 'If you went through anything like this, you could watch this and feel seen' -- I think that was the goal."

These days, Kaling said she feels content. "I am so happy with my career. I love my family. I love my freedom -- I have the freedom that comes with being financially stable, and I don't have to run anything by anybody," she said. "It's beyond the wildest dreams that my late mother could have hoped for me."