We conducted an experiment in which we hired workers under different types of contracts to evaluate how flexible working time affects on-the-job productivity in a routine job. Our approach breaks down the global impact on productivity into sorting and behavioral effects. We find that all forms of working-time flexibility reduce the length of workers’ breaks. For part-time work, these positive effects are globally counterbalanced. Yet arrangements that allow workers to decide when to start and stop working increase global productivity by as much as 50 percent, 40 percent of which is induced by sorting.