Matthew Perry revealed getting sober cost him a massive fortune as he estimated spending a seven-figure sum on his public battle against a substance abuse addiction throughout his life.

"I’ve probably spent $9 million or something trying to get sober," the 53-year-old actor told "The New York Times" in an interview released Sunday.

The "Friends" star, who began portraying Chandler Bing on the popular sitcom when he was only 24 years old, discussed his decades-long battle with drinking and drugs in his first memoir set to be released Nov. 1, "Friends, Lovers and the Big Terrible Thing."

‘FRIENDS’ STAR MATTHEW PERRY ‘REALLY GRATEFUL’ FOR JENNIFER ANISTON'S SUPPORT AMID ADDICTION JOURNEY

Matthew Perry from Friends

Matthew Perry claimed he spent "probably $9 million" trying to get sober through the years. (David M. Benett)

"I would fake back injuries. I would fake migraine headaches. I had eight doctors going at the same time," Perry said. "I would wake up and have to get 55 Vicodin that day, and figure out how to do it. When you’re a drug addict, it’s all math. I go to this place, and I need to take three. And then I go to this place, and I’m going to take five because I’m going to be there longer." 

MATTHEW PERRY OPENS UP ABOUT HIS BATTLE WITH ADDICTION: ‘BEING ON ’FRIENDS' PROBABLY SAVED MY LIFE'

He added: "It’s exhausting, but you have to do it or you get very, very sick. I wasn’t doing it to feel high or to feel good. I certainly wasn’t a partier; I just wanted to sit on my couch, take five Vicodin and watch a movie. That was heaven for me. It no longer is."

It wasn't just prescription medications that helped Perry clear his mind, but also alcohol. At one point, he revealed he had pursued 15 stints in rehab and underwent 14 surgeries for addiction-related medical issues. Perry was also on life support for a brief period and in a coma for two weeks.

Matthew Perry on Friends

Matthew Perry was cast on "Friends" when he was 24 years old. From L-R Matthew Perry as Chandler Bing, Jennifer Aniston as Rachel Green, David Schwimmer as Ross Geller, Courteney Cox as Monica Geller, Matt Le Blanc as Joey Tribbiani, Lisa Kudrow as Phoebe Buffay. (NBCU Photo)

Friends reunion

The cast of "Friends" reunited in 2021 for a tell-all about the iconic sitcom (Courtesy of HBO Max )

"Alcohol really did save me for a while," Perry said. "Then it didn’t. It’s like your best friend turns to you and goes, ‘Now I’m going to kill you.’ And then you raise your hand and say, ‘I need help here.’"

Perry said that he's been 18 months sober, which would mean he was new to the drug- and alcohol-free world when he filmed the highly anticipated "Friends" reunion in May 2021.

He said he had an interesting moment after recording his audiobook when he thought, "Oh my God, what a terrible life this person has had!" Then he realized, "Wait a minute, it’s me! I’m talking about me."

CLICK HERE TO SIGN UP FOR THE ENTERTAINMENT NEWSLETTER

The "Fools Rush In" actor recalled another painful memory where he had to carry his top teeth to the dentist in a baggie in his pocket after biting into a piece of peanut butter toast. "Yes, all of them," he wrote.

Matthew Perry appeared on WWHL in 2016

Matthew Perry revealed he's been 18 months sober after battling substance abuse issues for years. (Charles Sykes/Bravo)

While Perry is no stranger to writing and has written for television shows including "The Odd Couple" and "Mr. Sunshine," he was inspired to put pen to paper during his last extended stay at a Los Angeles hospital when he began jotting down his life story. After reaching 110 pages, he showed his manager some of his work, and was encouraged to continue writing. 

"It was hard to face all this stuff," he said. "Whenever I bumped into something that I didn’t really want to share, I would think of the people that I would be helping, and it would keep me going." 

He found inspiration from within to finish telling his stories and complete the book, and even dedicated the work to his community. The front of the book says, "For all of the sufferers out there. You know who you are."  

CLICK HERE TO GET THE FOX NEWS APP