Many researchers and companies have engaged in estimating users' interests so that an online shopping system can tell what he/she wants now. This paper tackles the next challenge in online shopping, i.e., predicting the times that users go shopping online. To predict the timing of online shopping, we focus on wandering behavior in web search activities and propose a search wandering score (SWS). Online shopping behavior can be categorized into three states: wandering shop-ping, focused shopping, and others. Wandering shopping is a state in which users make purchases in high SWS situations; focused shopping is a state in which users buy things in low SWS situations. Unlike previous studies, our work is based on an analysis of large-scale data containing shopping and search logs produced by approximately 200,000 users of a real web portal site for over a year. The results of an extensive evaluation show that our methodology can predict user's future shopping behavior types with 86% accuracy. This research is the first step towards understanding the relationship between users' mental states and their online shopping behavior.