I used to play OTB about 30 years ago, and was rated around 2000. I stopped playing for more than 25 years, and of course my strength went down... but it only took a year or so for me to recover it again.
How long does it take to forget chess, on becoming inactive?
I hadn't played in about 4 years (resuming in July of this year) and have noticed a significant drop in ability and understanding.

As of the last 5 months, I have been safe. How long more will it take? I mean how often should I play to keep my ability at the same level

I think the answer is based on three factors: how good you were when you stopped, your "natural" talent, how long you've been inactive.
Similar to post #4, I was inactive for close to 50 years! It still remembered all of the basics, including en passant, castling, pins, discovered checks etc. However, trying to set-up or see certain tactics and strategies was a whole new learning experience! I re-invested in several chess books for beginner to intermediate players and they helped immensely.
Good luck!

I hadn't really played for 15 years when I joined chess.com, but it didn't take long to get back to the level I reckon I had previously.
OK my experience... In the 1970's I was a high 2100. Essentially stopped completely until last year [so about 40 years and now I'm in my mid 60's]. I played in 1 tournament and had 1800 ish performance. Lost on time a game I had a win in because, well, I was thinking too slow and dithering too much. I find mow that I've lost that instant board vision, decisive thinking, seeing threats instantly, and I make mistakes by letting up my guard. I also find that people play differently now than back then. A;ll my experience with the Najdorf and other openings Fischer played doesnt help. People seem to play what I consider boring stuff these days. I've been starting tactical puzzles and it helps some. MY performance on these goes up and down a lot [like 1900-2300 on Lichess] depending on time of day even. I'm enjoying chess so there is that. I dont know if I'll ever recover former performance but I have a life and job that is demanding and interesting and fulfilling. I do hope to take a few master scalps if I can ever get time to play in more OTB tournaments. I'm also a WW kayaker and find that blitz did improve my mental processing speed which helps in steep creeking.

I used to play OTB about 30 years ago, and was rated around 2000. I stopped playing for more than 25 years, and of course my strength went down... but it only took a year or so for me to recover it again.
Yeah. I reckon it is about 2000-400=1600 and about two seasons to recover it.
It all depends if you have slipped back to hanging pieces.
I remember putting a piece undefended on the fifth and of course it was check and bye-bye piece.
I felt like I was twelve years old, and not in a good way.

sounds like you got a good wake up call though rat , and i bet it was timely too as i doubt you will do the same again
I was wondering how long does it take for a person to lose his strength in chess if he remains inactive for months, or years?