CBD, or cannabidiol, is a compound found in the cannabis plant that has been shown to have many benefits. How long it stays in your system depends on many different factors including the administration way. Eating an infused brownie, for instance, will affect your body differently than if you rubbed CBD oil into your skin. How long CBD stays in your system also depends on factors like body weight and frequency of use. The cannabinoid is fat-soluble, which means that it can accumulate in your fat cells after repeated use. 
If you’re taking CBD oil, the amount of time it takes for it to leave your system will depend on how much you’re taking and how often. For most people, CBD oil will be out of their system within 2-5 days. 
If you’re taking larger doses of CBD oil or using it more frequently, it may take up to a week or longer for it to completely leave your system.
CBD-containing edibles are another popular way to take CBD. Edibles are absorbed through the digestive system, so they take longer to take effect than other methods. CBD edibles can take anywhere from 2-4 hours to take effect and can stay in your system for up to 24 hours.
Vaping is one of the fastest-acting methods of taking CBD.
When you inhale CBD vapor, it’s absorbed directly into your lungs and immediately enters your bloodstream. This means that it takes effect very quickly, usually within minutes.  However, it also leaves your system relatively quickly and will only be detectable for a few hours after use.
References: Zgair, A., Wong, J. C., Lee, J. B., Mistry, J., Sivak, O., Wasan, K. M., Hennig, I. M., Barrett, D. A., Constantinescu, C. S., Fischer, P. M., & Gershkovich, P. (2016). Dietary fats and pharmaceutical lipid excipients increase systemic exposure to orally administered cannabis and cannabis-based medicines. American journal of translational research, 8(8), 3448–3459. [Journal impact factor = 4.06] [Times cited = 111]
 Nadulski, T., Pragst, F., Weinberg, G., Roser, P., Schnelle, M., Fronk, E. M., & Stadelmann, A. M. (2005). Randomized, double-blind, placebo-controlled study about the effects of cannabidiol (CBD) on the pharmacokinetics of Delta9-tetrahydrocannabinol (THC) after oral application of THC verses standardized cannabis extract. Therapeutic drug monitoring, 27(6), 799–810. https://doi.org/10.1097/01.ftd.0000177223.19294.5c [Journal impact factor = 3.118] [Times cited = 164]  Santos-Longhurst, A. (2019, November 19). How much CBD should I take the first time? Healthline. Retrieved September 27, 2022, from https://www.healthline.com/health/how-much-cbd-should-i-take-the-first-time#onset