Most of us have struggled with the obtuse calculations required to determine maximum participant loan amounts. Perhaps in the future robotic AI Human Resource managers will not have this problem, but until then we all seem to muddle through this occasionally.
The statute, which is not a model of clarity, reads as follows:
[The] loan (when added to the outstanding balance of all other loans from such plan whether made on, before, or after August 13, 1982), [may] not exceed the lesser of—
(i) $50,000, reduced by the excess (if any) of—