A 2010 study found that some habits can be formed in a matter of weeks while others can take more than five months.23 The researchers also found that the complexity of the behavior and how important the habit was to the person greatly affected how quickly the routine was formed.