Just for your information, particularly given how Japanese is taught to foreign students around the world, anime isn’t really a good gauge. Almost all of us are taught polite Japanese that’s appropriate for day-to-day interaction with people we don’t know very well or in professional settings. Anime Japanese is often much closer to what you might use with close friends, and frequently uses colloquial expressions that you probably wouldn’t need in a polite conversation. I have a friend who’s studying at the science faculty of a top Japanese university who passed the N1 a few years ago, and he told me some time in the last six months that very honestly, he isn’t sure he’s able to watch anime without subtitles even now. The issue is not that you won’t be able to deduce things from context, which I think is possible starting around N3 level (if you want a short answer): lots of the things my friend knows are things he picked up in context from anime or via songs, so much so that he knows what they mean based on feel but can’t explain why they work that way. The issue is that anime Japanese and classroom/JLPT Japanese are two different – if related – beasts. My friend isn’t alone, by the way: he knows someone else with an N1 who was shocked when he tried to read manga: ‘Wait, you can write 強い like that? stares at 強ええ’
My personal experience with anime is this: watching anime while listening carefully/reading transcripts and checking the dictionary can rapidly expose you to structures that you might find at the N3, N2 or even N1 levels: part of why all but the final chapters (chapter 12 of 15 onwards) of Tobira were fairly unproductive for me is that I had encountered almost all of the grammar via anime, newspapers, general reading or my first textbook, and that’s despite the fact that Tobira is an N3-N2 textbook. There was little left to learn, a little vocabulary aside. On the other hand, studying a ton of JLPT books will only allow you to parse anime sentences better, but probably won’t provide you with the kanji knowledge and specialised vocabulary that you’ll need for dealing with the setting of an anime: 経験値、防護 and the like are things you’ll only learn by watching fantasy/game anime (even if I can’t guarantee their usefulness as phrases, the kanji are useful), and you’re not likely to learn all the names of high school subjects in a textbook. 絆 is another kanji that’s so associated with anime clichés that you’ll have to come across it at some point, but you’ll probably never see it in a textbook.
In short, anime can teach you tons of stuff – including keigo, which you come across fairly often in anime, but which gets ignored by most non-specialised textbooks – provided you know how to convert casual speech into polite speech, and that can feed into JLPT-type knowledge. On the other hand, JLPT-type knowledge may help you get through NHK articles easily, but may not help with manga.
Even more briefly, mathematically speaking,
Studying anime + casual-polite translation skills => JLPT level UP
High JLPT level =x=> Understanding anime
Seconded. Maybe wait till you have roughly N4 grammar if understanding very little frustrates you. I was watching anime before I started studying Japanese, and after starting, I kept watching anime all the way through. As a beginner, watching anime taught me to catch syllables and identify common words that I already knew. As a more advanced learner, it challenges me to listen for words I still don’t know so I can look them up.