Ending a sentence with "to" is grammatically correct in these cases:
* Prepositions: When "to" is used as part of a prepositional phrase, it's perfectly acceptable.
* Example: "I went to the store."
* Infinitives: When "to" is part of an infinitive, it's also fine.
* Example: "He wants to go."
* Imperatives: Sentences that give commands often end in "to"
* Example: "Listen to me!"
However, it's generally considered informal or even incorrect to end a sentence with "to" in these cases:
* Using "to" as a simple preposition: This is considered grammatically incorrect in formal writing.
* Example: "Where did you go to?" (Instead, say "Where did you go?")
Ultimately, the best approach is to consider your audience and the tone of your writing. In formal writing, avoiding ending a sentence with "to" is generally safer. In informal writing, it's often acceptable.