You are correct that biotin can interfere with your blood test results. In simplest terms, the tests used to measure thyroid hormone and TSH (Thyroid Stimulating Hormone) levels have molecules that bind to biotin which can result in either a false low or false high result in the test. It can artificially throw off the blood test levels in either direction. Most studies tend to show that biotin causes more false-low measurements of TSH than false-high measurements but again, it can go either way.
Please be aware that the biotin doesn’t actually affect your true thyroid hormone levels at all, just the test results. This is good news because you can safely continue to take the biotin after you have completed your testing. The important thing here is to make sure that your biotin supplementation doesn't affect the test and be incorrectly initiated on the wrong therapy as a result!
Additionally, please make sure you let your doctor know that you have been taking biotin supplements, and let him/or her know how many days in advance of your test you decided to discontinue. The practitioner may also have experience in this area and can provide some helpful information for you. In addition to taking an oral biotin supplement, it is important to note that many foods contain biotin naturally.
Some of these foods include sunflower seeds, walnuts, pecans, green peas, lentils, carrots, mushrooms, cauliflower, avocado, organic dairy foods, egg yolks (not the white), and organ meats (like liver). Dietary sources of biotin typically should not have much of an effect on the tests however since supplementation doses often far exceed the amount you get in your diet.
In terms of biotin specifically, it is a water-soluble vitamin, commonly known as vitamin B7 (also as Vitamin H). It is an essential vitamin meaning that we need to continuously replenish via dietary intake. It has many important physiologic functions and is necessary for the metabolism of carbohydrates, fats, and the components of proteins. As you mentioned in you question, it also is a commonly used supplement for thinning hair, flaky skin and brittle nails.
Taking Biotin With An Upcoming Thyroid Test
To answer your question directly, after taking biotin by mouth, it should be out of your body anywhere between 2 hours to 24 hours.
As biotin is water soluble, the biotin that is not absorbed for functions in the body is rather quickly eliminated via natural excretions like urine or sweat. To be safe, I would recommend discontinuing the biotin for the 3-4 days prior to your blood test. The reason for this recommendation is to be sure you don’t end up with skewed results and so that you won’t be called back for a second blood test.
To be on cautious side, I would not resume taking the biotin until you’ve heard back from your physician about your blood test results. Consistency is key when doing blood tests so you don't want to dramatically alter your diet, supplementation schedule etc... if you are doing multiple tests.