Distance field calculation in Umbraco Forms

In a project a need to calculated distance (in km) between from/to addresses in both directions.
I wonder if any has already done something similar?

I found this simply example for a address lookup:

I recall from previously that custom field types mostly like storing simple types and not complex objects. IIRC it was rendered odd in records and not possible to edit OOTB.

Often we had a need to store a bit more complex object as in property data on content nodes.