'Cricketers, or any sort of sportsperson, have an expiry date and you need to walk away.'
The Surrey batsman, who quit Test cricket in 2015 with 12,400 runs, is fifth on the all-time list of Test run scorers, averaging 57.40 in 134 Tests.
"You try to fight the inevitable but you need to get out while you're ahead," the 39-year-old told the BBC on Monday.
"It's the last time I'll play a four-day game here. I'll be 40 in a few months, this is about the end of my time in county cricket."
As well as his Test exploits, Sangakkara has been one of the game's great limited overs batsmen and was part of the Sri Lanka team that reached the 2007 and 2011 World Cup finals, although they lost to Australia and India respectively.
His Twenty20 commitments will take him through to 2018, but his time in the longer format is almost over.
"My career might have a few more months (left) but that's about it," he added.
Having joined Surrey for the 2015 season, Sangakkara is still in good form. He scored over 1,000 first-class runs last term and hit two centuries against Middlesex at the weekend but feels it is still time to walk away.
"The biggest mistake that sometimes you can make is that you think you're better than you really are," he said.
"Cricketers, or any sort of sportsperson, have an expiry date and you need to walk away.
"I have been very lucky to play for as long as I did so but there's a lot more life to be lived away from the game."
IMAGE: Kumar Sangakkara celebrates his century for Surrey during the County Championship Division One match against Middlesex at Lord's Cricket Ground in London, on May 19, 201.
Photograph: Clive Rose/Getty Images
Winning the IPL thrice a 'big achievement' for Rohit
Ban on Sreesanth: HC issues notice to Vinod Rai panel
'Smith came very close to winning it in the last overs'
The IPL 10 Dream Team
Here are the big gains from IPL 10...