* As a simple affirmation: Here, it's like saying "yes" and doesn't need a comma.
* Example: "Are you coming?" "Yup."
* As a more emphatic "yes": You might use a comma if you want to add a bit of emphasis or follow it with more information.
* Example: "Yup, I'm definitely coming!"
* As a filler word: If you're using "yup" to fill a pause or add emphasis, you wouldn't use a comma.
* Example: "Yup, that's right, it was a great day."
In general, it's best to avoid using "yup" in formal writing. "Yes" or "yeah" are more appropriate. If you are using "yup" informally, you can often use a comma if you want to add emphasis or connect it to a following phrase.