if you are working in formula language then you can easily achieve this by simply using the formula:
“range1 - range2”
in some computed field. This will give you result in a list format where each date in range1 will be substracted from range2 and result will appear in seconds. Which you can convert to days by dividing the result by “(60 * 60*24)”
HTH
Note: for this, make sure that your range1 and range2 fields are of “date/time” with “allow multi values” checked