Distance to home

Does anyone the distance to home in QGroundControl is in 2D or 3D, (3D means it include the altitude). May I know what’s the formula and how does QGC calculate it ? I would appreciate if someone can answer me.