This dataset was collected through a survey conducted in 2021 and includes responses from 349 students (boys and girls) attending lower secondary schools in Norway. The primary objective of the data collection was to investigate how task difficulty labels influence students’ self-efficacy and performance in mathematics, with particular attention to gender differences. Variables included in the dataset: (1) Gender, (2) Self-efficacy related to three mathematics tasks, measured both before and after the tasks were presented with difficulty labels, (3) Performance on the same three mathematics tasks, (4) Task difficulty labels assigned to each task (experimental variable: easy, medium, or difficult). This dataset enables analysis of how labelling mathematics tasks as “easy”, “medium”, or “difficult” affects students’ self-efficacy and performance, and how these effects may differ across genders.