There is no general rule as to when exactly you should have a haircut. There are some factors that need to be considered. This is because our natural hairs grow very differently; some grow faster than others. And it also depends on the type of hairstyle you like to keep. Some like a shorter style, which means cutting it every three weeks is still okay. Like I said earlier, this is not for everybody, even if you like shorter styles. Yours might be every four to six weeks if you notice your hair does not grow very fast.
If you are keeping a mid-length hair, you also need a trim, but four to five times a year is still okay. In addition to this, proper treatment is strongly advised. Also, if you are keeping a very long hair, it is usually advised to cut it once it is getting longer than your shoulder. For this type of hairstyle, your hair can easily get damaged by split ends, which means you need to take good care of it.