Complex calculation possible?

Hi,

I am trying to mimic something I did in another platform on Bubble (Hobby Plan)

I want do the following calculation

D = (√((x1-x2)² + (y1-y2)²)/1000)

x1 and y1 are stored on company thing. Values can vary per record.
x2 and y2 are now for testing purposes set to one fixed value using defaults in custom states. Ideally it will be present employee thing.

How should I setup this formula in Bubble?