My rule of thumb is that at about 3x or 4x Deadly, whoever fights more intelligently should win/survive. (That generally should be the player characters if I'm doing my job correctly.
Exception: if they're fighting highly intelligent and militarily-experienced adversaries like drow, mind flayers, or veteran scro/hobgoblins, it's possible for the monsters to play smarter than certain players.)
At 5x or 6x Deadly, it's more likely than not that players who just charge in swinging will lose/die, although sometimes they come surprisingly close to victory based on die rolls and/or magic items.
Anything of Medium difficulty is a curb stomp,
unless the enemies are playing smarter than the PCs (e.g. drow again), in which case the players can still lose and I will loudly gloat about it (while secretly hoping they'll fix their tactics and do better next time).
Generally a fight of M Nth level PCs against their mirror-image doppelgangers will work out to about 3x Deadly. Since the CR calculations undercount a number of class abilities that don't show up well in the CR system (e.g. crowd control, stealth), that implies that 4x Deadly is approximately the right ballpark for player-vs-monster "fair fights", which matches my experience.
Of course, triumphing over a peer is less fun than triumphing over a more-powerful foe. 10x or 20x Deadly fights are exhilarating when you find a way to win anyway, through skill. That's my philosophy, anyway. (And that's why TPKing the PCs with the occasional highly-intelligent drow in a Medium encounter is a guilty pleasure for me.

)