Windows RT 8.1 vs WP 8.1 (Vs android)

Obviously if we go by apps, RT is a clear loser. So lets go by capability. Take the desktop out of the equation, which OS is better>

Windows Phone or Windows RT?

Compare both to Android if necessary.