Part of the medical deduction is a preference, and part is not. If you are satisfied to get the regular tax correct (and have an error in the AMT) then just add
If I could change the interface by adding another variable (for medical expenses) this could be dealt with without additional explanation. But for the moment I don't want to add variables, especially for an item that very few users will have data on. So the question is, can the user allocate the medical expenses to get the correct answer for both regular and AMT?
The answer is yes. To get both the regular and AMT correct, the medical deduction must be split up according to the following:
This formula works because the AMT preference for medical expenditures is always equal to or less than the medical deduction on Schedule A. The amount for the AMT is given my the line16_med expression above. Then in line 20 subtract that amount from the Schedule A deduction. Then the total will be the correct Schedule A amount.
The formulas above work for all taxpayers 1960-2012 and for the elderly in 2013. For non-elderly taxpayers in 2013+ the formulas would be:
I would like to thank Kathryn Stevens for pointing out this difficulty.