There's an odd distinction here that's always kept me from feeling great about any answer. When we say greatest, we usually mean "most iconic." I'd argue that the best actors are likely those that have disappeared into dozens of memorable but not legendary performances. Someone like Gary Oldman doesn't have Tom Cruise's career. But his range is ridiculous, and half of the roles you need to be reminded that he actually played the character...but not in a "forgettable" way, but in a "wait, that was him?!" way.
On the flip side of that example, Cruise does have a charisma that's made him an iconic leading man. Oldman, for all his greatness, is not on that level in that particular category.
So my best of all-time would likely be someone that blends those two arguments, but perhaps isn't at the very top of the traditional lists of iconic actors. Because, yeah, Deniro, Brando, Newman, Pacino, Hanks...amazing actors. But they're all in the charismatic leading man argument, but not necessarily the Oldman-style argument.
Personal favorites of mine include Nick Nolte, Kenneth Branaugh, Bill Murray, Charlie Chaplin, Nicholas Cage, and Paul Newman.
For women it's Meryl. I mean, come on. Who else is close? She annihilates anyone else in range, charisma, success, and nuance.