I have to go
A more direct and immediate way to say "I'm leaving now." Use it as you are about to depart.
"I must go." Slightly more formal or serious than "Tengo que irme."
"I need to go." Very similar to the main phrase, it emphasizes the need rather than the obligation.
I'm sorry, but I have to go. We'll talk tomorrow!
Thanks for the coffee. I'm leaving now because I have an appointment.
The party is fun, but I must go. I work early tomorrow.
Oh, it's very late! I need to go now.
The phrase 'Tengo que irme' is understood and used everywhere in the Spanish-speaking world. The 'me' at the end of 'irme' signifies leaving *from* a place, which is why it's so common for departures.
It is very common to hear 'Me tengo que ir,' placing the pronoun 'me' before the first verb. Both 'Tengo que irme' and 'Me tengo que ir' are correct and used frequently.
'Ya me voy' is extremely common as a direct way to announce your departure. You might also hear the friendly 'Ahí nos vemos' used in a similar way to say goodbye and that you are leaving.
While 'Tengo que irme' is standard, a very common and warm way to announce your departure in a group setting is, 'Bueno, los dejo' (Well, I'll leave you all).
Similar to Spain, 'Me tengo que ir' is very common. A very colloquial and popular phrase is 'Chau, me fui' (Bye, I'm gone), said at the exact moment of leaving.
Saying 'Tengo que voy' instead of 'Tengo que ir'. — The structure 'tener que' (to have to) must always be followed by the infinitive (the basic form of the verb, like 'ir', 'comer', 'hablar'). You do not conjugate the second verb.
Saying 'Tengo irme' instead of 'Tengo que irme'. — The 'que' is a necessary part of the 'tener que' structure. It cannot be omitted. Think of 'tener que' as a single unit that means 'to have to'.
Using 'Tengo que ir' to mean 'I have to leave'. — While technically correct, it's less natural. 'Tengo que ir' usually implies going *to* a specific destination ('Tengo que ir al banco'). 'Tengo que irme' specifically means you are leaving *from* your current location, which is usually what you mean when ending a conversation.