The length of time varies from person to person, but it usually takes between 18-24 hours to fast for BDNF production(Related to Ketones). It is important to note that you need to have enough calories and proteins in your diet daily to maintain your health and keep your body functioning properly.