Other money managers studying at universities have sought advice from Mr. Swensen. He always suggested that they keep their offices on campus if possible, and he was sensitive to issues that the students had brought up, like climate change. The students continued to press Yale to take a stronger stance on the matter.

Mr Swensen acknowledged that greenhouse gas emissions are a serious threat and urged managers to consider the financial risks of climate change, especially when the government imposes carbon taxes. The investment bureau recently estimated that 2.6 percent of foundations are invested in fossil fuel producers, a multi-year low, and expects the decline to continue.

In 2018, Swensen said Yale would not invest in outlets that sell assault weapons. Most recently, he encouraged foundations to employ more women and members of minorities.

Over the years he has served as a trustee or advisor to a variety of institutions including the Brookings Institution, Carnegie Corporation, Courtauld Institute of Art, Chan Zuckerberg Initiative, and the states of Connecticut and Massachusetts.

Mr. Swensen’s first marriage to Susan Foster ended in divorce. In addition to Mrs. McMahon, three children survive from his first marriage, Alexander Swensen, Timothy Swensen and Victoria Coleman; his mother Grace; two brothers, Stephen and Daniel; three sisters, Linda Haefemeyer, Carolyn Popp, and Jane Swensen; and two grandchildren. He lived in Killingworth, Conn.

Mr. Swensen was just as concerned about the small investor as he was about his talent. In his book, Unconventional Success: A Basic Approach to Personal Investing (1995), he advised people to keep their costs low and stick to exchange-traded funds that invest across an entire stock index, rather than investing with money managers or mutual funds who pick individual stocks and where costs can reduce profits. It is virtually impossible for the average investor to get into the best private funds, he said.

Alex Traub contributed to the coverage.