Yes, your intuition is good.
This is how to calculate the difference between 2 dates in Kibana scripted fields: Kibana, getting todays date
There will be small differences in seconds based on how many documents the calculation is done for, but I guess you don't need that kind of precision.