There is no absolute answer to this question. It depends on the type of litter, how much litter is in the box, the number of boxes, the number of cats, what kind of food they eat, how fussy the cats are, etc.
Basically, you change it when it needs changing. When's that? It needs to be changed before the cats stop using it. This is a matter of trial and error. And a good reason for having more than one litter box. If you rotate when multiple boxes are changed, then when the cats stop using the older of the boxes, you know it's time to change that one.
For me, changing means emptying out all the old litter, washing the box with soap, bleach and hot water, drying and airing thoroughly.
I have three cats and two large boxes using non-clumping clay litter and get 7 - 10 days per box.
Those who use clumping litter are able to go much longer between change-outs because the urine is removed along with the feces during scooping.