Calculate End Date based on several fields and factors

Calculate End Date based on several fields and factors

Hi all, I was wondering if it is possible to achieve this thing with Formula Field or Function:
We have several fields that needs to be taken in consideration when calculating End Date. Relevant fields are:
Meal Start Date (Date Field)
Meal End Date - this one needs to be calculated
Days in Week (Multiple select picklist Mon-Sun options)
Subscription Period (Picklist with values 7,14,30)
Pause Date
Resume Date

Now, we would like to calculate Meal End Date based of Subscription Period and Days in Week selected (each day would deduct one from subscription period). Also, in cases where pause date and resume date is included we would like to calculate that period also and add it to the end date. I have written a formula that adds number of weeks to the Start Date and calculate the pause period if included but the result is inaccurate due to inability to calculate the exact end date.

To be more precise:
Start date: 11/19/2024
Duration: 30 days
Number of Selected Days: 3 (Monday, Tuesday, Friday)
The end Date would be in that case: 01/29/2025 which is exactly 10 weeks from start date and it's Wednesday but the correct result should be 01/31/2025 as it's Friday.

Any idea or functions that we could apply for this matter that will give us accurate end date?

Thanks!