Unhealthy snacking is a major behavioral contributor to overnutrition and obesity, yet the psychological and demographic determinants of real-time snack selection remain unclear because most studies rely on retrospective self-reported dietary measures. Drawing on compensatory consumption theory and dietary restraint models, this study examined the main and interactive effects of trait impulsive buying and gender on objectively measured snack calorie selection. A cross-sectional observational study was conducted among 100 undergraduate students (80% female; aged 18–23 years) in Central Java, Indonesia. Trait impulsive buying was assessed using the validated 9-item Buying Impulsiveness Scale (α = 0.87). Objective snack selection was measured through a simulated online supermarket in which participants freely selected from 40 commercial snack products without budget constraints. Total caloric content (kcal) of the selected snacks was analyzed using a General Linear Model (GLM). Significant main effects were observed for gender (F = 9.323, p = .003, ηp² = .089) and trait impulsive buying (F = 5.734, p = .019, ηp² = .056). Male participants selected substantially more snack calories than females. A significant interaction between gender and impulsive buying (F = 4.625, p = .034, ηp² = .046) indicated that higher impulsive buying predicted greater calorie selection among males but lower calorie selection among females. These findings suggest that gender moderates the relationship between impulsive buying and snack selection, reflecting distinct psychological mechanisms underlying eating behavior. Public health interventions should adopt gender-sensitive strategies by emphasizing impulse-control approaches for males and addressing emotional coping and dietary restraint processes among females to promote healthier snack choices.