I think it depends more on how far along you were when you miscarried. I've had it range from a week to 5 weeks, and I didn't have any medical or surgical intervention. The farther along I was the longer it took.
I recently miscarried at 7.5 weeks and tested negative 12 days later
I miscarried at 11 weeks and never tested until my next cycle a month or so later but it was negative
I think it depends more on how far along you were when you miscarried. I've had it range from a week to 5 weeks, and I didn't have any medical or surgical intervention. The farther along I was the longer it took.