Getting admitted to a PhD program at 47

what is the chance of to be admitted to a PhD program at 47?

As far as I am aware, age is not a factor. Your research experience most certainly will be, though.

^This is true. Your age is not necessarily a factor, so you’re theoretically on the same playing field as everyone else.

I’m not saying that there aren’t some professors out there who have (conscious or unconscious) preferences for younger graduate students, with the assumptions that they will be more energetic and/or moldable and/or have a longer career in academia. But they’re going to be a small minority.

what about hiring after graduating the program? won’t they prefer graduates that are 20 years younger than me?

^Same answer. Discriminating against people over the age of 40 is illegal, but that’s not to say that some people won’t do it.

Theoretically, you should be on the same playing field as everyone else, and the majority of people won’t discriminate against you based on your age. Some people may not even realize how old you are until you show up for the on-campus interview, because they gloss over the college degree age.

There will always be some people who have biases and assumptions about people over the age of 40, though, and there will definitely be professors who (if they even know your age - which they can assume on the basis of your college degree dates, I suppose) will think “Well, if we hire her she may only have 10-15 good years here, but if we hired someone in their 30s they could work here for 30-40 years!” Nobody can guarantee that won’t happen. It might.

But there are lots of professors who have started their academic careers in their 40s and 50s, so it’s not impossible or even unlikely. It’s a challenge you face and a risk you take.