I have a spreadsheet with two columns Day and Cashflow. Cashflow represents the initial cash outlay and then a running revenue total. How do I calculate the payback day (Day 4 in the example) via formula?

Day 1 -300,000
Day 2 50,000
Day 3 200,000
Day 4 325,000
Day 5 400,000