MX > YX > Terranort > Xemnas > Ansem
MX: it's clear that he haven't been going all-out and the BBS reports clearly states that his reason for taking over Terra's body was cuz of old age, but seeing how he have pretty much only been pulling the strings and since he pretty much control the darkness (and w/o the weakness for light that Ansem possess) and also got some of the power of Kingdom Hearts, I would say he's the strongest
YX: if we ignore the whole Kingdom Hearts, and a bit of the darkness, YX is like a more physical MX, but with less combat experince, since he's as fresh as you can get. it's mainly his control over time that places him 2nd though, else he would be tied with Xemnas in my book
Terranort: he could actually be stronger than MX, if it wasn't the fact that Terra's body limit some of his abilities. he could be stronger cuz Terranort got the stamina and physical capacity that MX lost due to old age, but also got Guardian on his side, the only reason he isn't is cuz Terra is still holding Xehanort back from fully controlling his body, as seen at BBS final chapter and 0.2 (considering how many years have passed outside of RoD during the time that scene took place)
(Final form included for both Xemnas and Ansem)
Xemnas: Xemnas clearly shows all his telekinectic abilities that Xehanort got, by throwing buildings at Sora and Riku, he and Ansem are the only Xehanort versions that got truely defeated, which is why I placed them last. of cuz it's not clear how strong Xemnas actually is during DDD, since he clearly got stronger
Ansem: just like Xemnas, it's unclear how strong he was during DDD, but he was also defeated at full strenght, prior to that. the only reason I place him last is cuz if we don't include his final form, he lost to Sora at 1vs1 during KH1 and Riku at 1vs1 during CoM (I feel like he was holding back at DDD, due to that scene before Riku fought YX). so yeah, the main reason I consider Ansem weaker than Xemnas is cuz Ansem got defeated by 1 Keyblade, while Xemnas required 2 Keyblades (or 3, if including Sora's Limit Form) to be defeated