How long is scabies usually contagious for?

Long. As long as the person still has the active lesions which contain scabies, he/she is contagious to other people anytime he/she comes in (close) contact with.
Until treatment. Scabies remains contagious until you are completely treated which usually takes two weeks.