It's fine grammar. It's not "informal". (Just throwing that out there in so people don't get confused that there might be something wrong with the sentence. It's simply a mistake that a complex language translating program is making. We English speakers are all completely comfortable with understanding and using the sentence.)
The concept is the same, whichever way you phrase it in English, but the Spanish actually translates as, 'Are you going to swim today?' using the verb 'ir + a' as 'going to', followed by the infinitive, 'nadar'. 'Will you swim?', or 'You will swim?' would be the straight future tense, which would be 'Nadaras' (with accent on third 'a'.
Are you swimming today? ... would be ¿Nadas hoy? or ¿Estás nadando hoy?
But here we have ¿Vas a nadar hoy?
When we use "IR a <verb>" like this (vas a nadar) then it's a way of talking about the future ("going to <do something>")
Voy a nadar ... I am going to swim Vas a nadar ... You are going to swim Vamos a nadar ... We are going to swim