Tyler Perry has a lot to be thankful for, and recently celebrated his good fortune by participating in a 47-mile bike challenge — one mile for each of his 47 years.

In a video he posted on his Facebook page, the writer/director/producer/actor known to moviegoers for his Madea character in such films as “Madea’s Family Reunion” and the upcoming “Boo! A Madea Halloween” explains that he undertook the ride as a way of giving thanks for where he finds himself at this age.

RELATED: Tyler Perry And Girlfriend Gelila Bekele Welcome Baby Boy

“Life is about running your own race, not anyone else’s,” he explains. “But in dedication to my son and my mother, who died at 64 from complications of diabetes, it’s about being healthy, it’s about having an amazing, strong life, and it’s about thanking God for 47 years, man.”

He continues: “I get emotional when I think about it — 47 years for a man who thought he wouldn’t live to see 30, because a lot of my friends didn’t live to see 30. They got murdered, jailed. I came from pretty rough neighbourhood, but here I am celebrating 47 years and it’s incredible.” Watch: