Mental focus is paramount for productivity and happiness. However, keeping our mind on task is challenging. Under what conditions can we keep our minds on task, and how can we improve mental focus? We answer these questions with a series of novel online experiments using roughly 2,700 participants logging over 1,250 hours of tedious work, where we measure, second-to-second, whether their mind is wandering off task. The experimental paradigm can also disentangle top-down mind-wandering (i.e. intentional) from bottom-up (i.e. unintentional), allowing us to isolate the effect of various interventions aimed specifically at abating unintentional mind-wandering. Generally, we find the most effective costs for abating mind-wandering are those that are easily internalized by the mind at the outset of the task. Costs extrinsic to the task, and thus less obviously internalized, e.g. having to work more later for every mistake, have modest-to-no effect even for subjects with perfect recall of the costs before and after the task. However, putting those same costs top-of-mind right at the outset of the task can decrease mind-wandering dramatically. Costs due to the nature of the task are naturally internalized and determine focus – we find that more cognitively arousing tasks improve mental focus. We experimentally vary costs intrinsic to the task, e.g. we make the task more interesting while holding constant how physically taxing it is, and find substantial gains on mental focus. In line with cognitive arousal, we also find that decreasing novelty of the task increases the incidence of mind-wandering.