Elevation of a planned course (1 lap vs 2 laps)

I planned a course of 40km390 with an elevation of +1223m and -1224m (https://connect.garmin.com/modern/course/311367204).  Then I planned another course that's equal to twice the first course and got 80km790 (https://connect.garmin.com/modern/course/311371335).  But why do I get an elevation of +1665m and -1662m for the second course and not +2446m and -2448m?

There's also a difference when I study the climbs on my watch: 28 ascents and 28 descents for the 1st course and 31 ascents and 28 descents for the 2nd course.  The 1st starts with -5m over 0km390 followed by +67m over 1km430 the second course starts with +53m over 1km080 followed by -52m over 0km860.

  • The elevation gain is calculated as the sum of the differences of all adjacent trackpoints, so it greatly depends on the number of trackpoints. The more they are (the finer the resolution), the higher the elevation gain will be. This is known since centuries also under the name "the Coastline Paradox".

    And since Courses in Garmin Connect have some limitation in the total number of points, longer courses are optimized more than shorter ones, resulting in lower trackpoints resolution, and hence the lower elevation gain estimate.