Marijuana can stay in your system for different lengths of time depending on various factors. It can typically be detected in a drug test for up to 30 days, but frequent users may test positive for longer periods.