Meaningful variation in internal states that impacts cognition and behavior remains challenging to discover and characterize. Here we leveraged trial-to-trial fluctuations in the brain-wide signal recorded using functional MRI to test if distinct sets of brain regions are activated on different trials when accomplishing the same task. Subjects performed a perceptual decision-making task and provided confidence. We estimated the brain activations for each trial and clustered trials based on their similarity using modularity-maximization, a data-driven classification method. We identified three subtypes of trials that differed in both their activation profile and behavioral performance. Critically, Subtypes 1 and 2 were characterized by activations in different task-positive areas. Surprisingly, Subtype 3 exhibited strong activation in the default mode network, which is typically thought to decrease in activity during a task. Computational modeling revealed how the patterns of brain activity in each subtype emerged from interactions within and between large-scale brain networks. These findings demonstrate that the same task can be accomplished in the presence of widely varying brain activation patterns.