There are now quite a few online calculator tools on the web for calculating sea distances between two ports, multiple ports, or even waypoints. Some are quite accurate, others are a still a little crude. The challenge in determining accurate distances across water is that vessels can essentially travel anywhere without an obstruction. This differs from terrestrial distances as generally roads, trails and rail lines determine where you can travel.
Out of the many tools available, we’ve found Searoutes.com to be the most useful at this time. They also offer an API for running multiple routes though it is not at all easy to use at this point. Still for calculating distances, this is our go to.
Professional tool for route and distance calculation, voyage planning of seagoing vessels.
Source: Sea Routing