Philippa Lally (2010) recently studied the how and how long of forming habits. She had people choose an eating, drinking or activity behavior to carry out every day for 12 weeks. In addition, the participants in the research would go online and complete a self-report habit index (SRHI) each day, to record whether they had carried out the behavior.

https://www.blog.theteamw.com/2011/03/18/100-things-you-should-know-about-people-84-average-time-to-form-a-habit-is-66-days/