From the man himself:
“Some recent set pictures from Avengers 4 (though, it wasn’t confirmed if it was Infinity War or Avengers 4) featuring Robert Downey Jr.’s Iron Man have seemingly pointed out that he might not make it out of the next couple of films.
Robert Downey Jr. took to Instagram to reveal that he will officially return for Avengers 4, confirming he will in fact survive Avengers: Infinity War – though we already probably knew that:
As far as when we can expect to see RDJ leave the role of Iron Man, the actor basically said he will do it as long as it’s still good:
“Everyone says to me it’s like a glove that fits so well. I have to start over every time but I am starting over with a pretty solid base. I just never want to blow it for the last six or seven (MCU movies) I have done by dropping the ball because I decided to go do it one more time. I just want to hang up my jersey before it’s embarrassing.”
The synopsis for Avengers: Infinity War: As the Avengers and their allies have continued to protect the world from threats too large for any one hero to handle, a new danger has emerged from the cosmic shadows. A despot of intergalactic infamy, his goal is to collect all six Infinity Stones, artifacts of unimaginable power, and use them to inflict his twisted will on all of reality. Everything the Avengers have fought for has led up to this moment — the fate of the Earth and existence itself has never been more uncertain.
Infinity War releases on May 4th, 2018 and Avengers 4 will be released May 3rd, 2019.”