"tot ziens" is more formal than "doei". "tot ziens" is also a bit odd to say to someone you're likely never going to see again. "tot ziens" is short for "tot weerziens". "weerziens" comes from "weer zien", which means "see again". "tot" means "until". Therefore, "tot ziens" roughly means "until I see you again" or "until we see eachother again".
That said, "doei" is informal, and many older people think it's rude if you were to say that to them without knowing them. When I'm in that situation I often say "tot ziens". I personally think of it like: I liked talking to you, and I hope we meet again.
Vaarwel - In English this would be "farewell". This can be used when you never expect to see someone again because you're going to a place far away, or because one of you is going to die soon. It's never said to total strangers. It's quite similar to the "farewell".
Later - An uncommon way of saying bye. It's pronounced the Dutch way and is short for "tot later" or "zie je later" ("until later" or "see you later" respectively). It is the informal way of saying "tot ziens" and only used towards people you know.
Tot morgen - In English this would be "until tomorrow", and you'd say this when you expect to see someone again the next day. Most often used among coworkers and friends. Since it's often used among coworkers it often changes on fridays to "tot maandag" (eng: "until monday") since you're probably not going to see them during the weekends.
Tot volgende week - until next week (I'll see you again next week)
Tot de volgende keer - until next time
And my personal favourite: "tot dan dan". I don't think I've ever heard anyone else say this, but I use this quite often myself because it sounds funny. It roughly means "see you at that time" Here's an example ofhow I'd use it:
vriend: "Ik ga naar huis. Tot morgen!" (friend: "I'm going home. See you tomorrow")
ik: "oké, tot dan dan!"
I only have a desktop and tumblr seems the best way to share this. It's the link to show that Tot Ziens was marked wrong for me. https://beingjennifer.tumblr.com/image/182508004052
Please submit a bug report: https://support.duolingo.com/hc/en-us/articles/204728264-How-do-I-report-a-bug-