People who regularly consume caffeine may experience withdrawal symptoms after suddenly quitting caffeine. Symptoms of caffeine withdrawal include headache, fatigue, mood changes, difficulty concentrating, and constipation. A 2019 study reported that gradually reducing caffeine consumption over a 6-week period led to successful, long-term caffeine cessation with minimal side effects. So perhaps instead of going abrupt cold turkey, you should attempt a gradual taper.
Clarify, are you saying you quit because of anxiety from the caffeine or you have anxiety since quitting the caffeine? As to duration of withdrawal symptoms, nobody can answer that question for you. People differ a lot. That's why the above is very good advice, a slow taper can ameliorate withdrawal symptoms in most people, though not all. I will say, I didn't know about quitting caffeine causing anxiety, though, if that's what you're saying, always thought the main problems were headaches and lethargy.
Oh my gosh, quitting caffeine! So hard. I did it and it was difficult. I had headache and just felt terrible. For me, it was full blown bad feeling for two full weeks with a third week of not feeling great and then after that? Home free. I was better after 3 weeks. And had MORE energy. I do think our bodies readjust. the issue though is figuring out if other things are going on. Could you also have anxiety issues that are worse than usual right now unrelated to the caffeine? And let me tell you, it is so easy to slip back to caffeine. Back on it now myself . . . grrrrr. I know I will have to go all through it again. Here is a question for you . . . how are you sleeping?
I quit caffeine years ago, cold turkey. It is NOT easy.
One thing to consider is how you were getting your caffeine? If you were drinking diet sodas, or coffee with artificial sweeteners, you may also be dealing with aspartame withdrawal. (There's some controversy around this, and the science for sure isn't settled.)
I drank a LOT of Diet Coke. After about 2 weeks of caffeine-withdrawal headaches and the like, I had a lot of irritability, anxiety, etc., and I believe - and others may not, and that's okay - from aspartame withdrawal. It's worth a google on it. For me, it lasted a couple of months, all told, but it was definitely worth it. Hang in there!!