Calculate Date Based on Total Duration


I have a tasks table with “Estimated Time to Complete” (field type is Duration). I want to determine the due date for the task based on the total duration of tasks. For example:

Task A = 30 minutes
Task B = 40 minutes
Task C = 75 minutes

Let’s say I have a maximum limit of 90 minutes per day. Tasks A and B should have the same due date. The due date for Task C would be following day.

Any ideas on how to write a formula to accomplish this goal?