If you're talking about doing this from your easy chair before or after walking, Google Earth is the easiest. Just use the tools menu, select "ruler", select "path", set your measurement units, and click along your path. Ican't remember if regular Earth does it or if you need Pro, but I think Pro is still a free license for consumers.
Otherwise your S9 and Samsung health will do it realtime when you choose a walking or running activity and let you review the map, as well as elevation gains, etc. after you're done. Most mid range and higher fitness watches let you do it as well.