The scholars have differed on zakah due on 401(k) and adopted three main opinions. Some have considered the zakatable amount to be that after subtracting penalties and taxes that would be due for early withdrawal, where such withdrawal is legally allowable, such as Dr. Main Al-Qudah: http://www.amjaonline.org/fatwa-23284/info. After this adjustment, one could calculate them similarly to the zakat on passive investments e.g. stocks held for more than a year.
Others have considered that no zakah would be due until he claims the retirement money, such as Dr. Walid al-Manisi: http://www.amjaonline.org/fatwa-2113/info
A third opinion holds that zakat is due on the entire amount in the 401(k).