Take a look at:
www i-orp com
It determines how you should spend from various funds to minimize the amount of taxes owed (it has built-in tax code models).
From the ORP home page:
The Optimal Retirement Planner (ORP) is a tool to evaluate how the first two issues impact the third. Given your current savings, planned savings and the amount that you plan to leave in your estate (immortality is not a retirement option) ORP's case management allows you to compare how inflation and asset returns impact the annual amount of after-tax money available for retirement spending. ORP does not ask you how much money you plan to spend each year. Instead, ORP tells you how much will be available.
ORP computes your cash flow during retirement from investment returns and drawing down your capital to a given estate level at the end of the plan. ORP's embedded linear programming optimizer maximizes the cash available for spending during retirement by modeling compounding investment returns, inflation, income taxes and minimum withdrawal requirements.
ORP is a retirement planner like no other!