a method for operating an internal combustion engine having a motor and an exhaust gas aftertreatment system having an exhaust gas aftertreatment component , wherein exhaust gas formed in the motor during combustion of fuel is guided via the exhaust gas aftertreatment system for cleaning , includes : determining an exhaust gas actual value that depends upon an actual value of a nitrogen dioxide fraction in the exhaust gas upstream of the exhaust gas aftertreatment component ; and changing at least one operating parameter for the motor such that the actual value of the nitrogen dioxide fraction is brought closer to a corresponding reference value for the nitrogen dioxide fraction .