There’s a really old thread about this somewhere. I put an identical Garmin file in to (iirc) Strava, Everytrail and Endomondo to see what they do. In short, (iirc)
– Everytrail just added up all the small + an – gains/losses in elevation (so the total height of a flat road is not zero, due to GPS/Alt errors).
– Endomondo did some kind of smoothing (so it makes you total climb/descent look less than what might be published)
– Strava conjured up extra height gain/loss that was not even in the file (no clue why or how), but I think in general it does much the same as Everytrail with little smoothing. Nuked my Strava a/c so I can’t easily double check this.
I’d normally ignore published altitude gain for a trip, because you have no idea how it was recorded. iPhone? GPS+Barometric? Smoothed out data? All the main dips/valleys and summit altitudes read directly from an OS map?
It also goes a bit asymmetric if you have lots of data points going uphill (slowly), and fewer going downhill (faster), especially with lots of switchbacks, unless you’re lucky and teh GPS records a datapoint right at each apex.