The 38-year-old made a statement to the effect shortly after India's [ Images ] practice game against the Northants.
Earlier in the day, the ace batsman had been picked for the upcoming ODI series against England.
"I am announcing my retirement from ODIs and T20s following the series against England. Thereafter, I will focus only on Test cricket," said Dravid.
"I have never discussed ODI cricket with anyone in the last two years and I feel it is the right time for me to focus solely on Tests," he added.
Dravid has aggregated 10,765 runs in 339 ODIs (@ 39.43), and that is inclusive of 12 centuries and a whopping 82 half-centuries.
He admitted his selection for the England series was a surprise, but added he had made his decision.
"In the short term it is an excitement, for sure. I was surprised, honestly!" admitted Dravid.
"But, in the long term, I would like to focus only on Test cricket," he added.