Both systems are very similar and have very similar offerings when it comes to games, and online play and both are the same price so it's a tough call.
What makes them different are the controllers and the exclusive titles. For example Xbox has Halo, Forza, Fable, Killer Instinct, PS4 has The Last Of Us, The Order 1886 and Infamous SS
If you like shooters and more fast paced casuual games Xbox is better for that, If you like deep story driven games then PS4 is good for that
When it comes to online, they are both the same.
Do you care about TV functioanlity at all because Xbox can be used a cable box.