There’s no one-size-fits-all length. It’s recommended to choose a term length that covers the nonprofit at least until:
Your mortgage is paid off
You reach your savings goal
That way, you may have more financial freedom to determine how you wish to continue to support your passion and nonprofit(s) of choice.