I'm trying to figure out the math for calculating when I'm going to hit my crossover point (passive income equals expenses). I want to incorporate current invested assets (and the return on them), as well as savings rate.

For an example of easy figures to work with:

500k invested assets

assume 7% return

annual savings of 50k

current expenses 40k (1 million needed)

Anyone know the math to calculate how many years to hit it? I believe there's a natural log in there for the compounded return, but the specifics are beyond me.