How to calculate an overlapping date range?

Could anyone give me some help involving time periods (dates) that overlaps.

Let’s say I have a data type that stores a vacation period (consecutive days). Then, two employees schedule vacations on a range of overlapping dates.

Example:

Employee 1:
Start: 01/20/2023 - End: 02/10/2023

Total: 21 days

Employee 2:
Start: 01/25/2023 - End: 02/20/2023

Total: 26 days

Overlapping range:

Start: 01/25/2023 - End: 02/10/2023
Total: 16 days

Previously I was using two fields for dataStart and dataEnd, but that didn’t give me the option to work with the overlaps with operator.

But even using a date range type field now, I still can’t sum or extract the overlapping days.

I appreciate any help.

End 1 - start 1: convert to days