calculates retirement

uses term parameter defined in the function call.