"Farewell @WhiteHouse! Your visit has taken India-USA ties to a new level & opened a new chapter. Wish you a safe journey," Modi tweeted.
"As for the rainy day yesterday, as you yourself said @WhiteHouse today morning, Bade Bade Deshon Mein :)," he said.
Barack Obama and Michelle Obama boarded their special Airforce One flight at around 1-55 pm.
The flight took off at around 2 pm from Palam Airport. Obamas are headed for Saudi Arabia to offer condolences for the death of King Abdullah.
Obama became the first US president to take part in the Republic Day parade of India at the invitation of Prime Minister Narendra Modi.
During the visit the two leaders also had a breakthrough in the stalled civil nuclear deal.