BALTIMORE — He arrived on campus a middling high school student from Medford, Mass., who had settled for C’s and had confined his ambitions to the math club.

But by the time Michael R. Bloomberg left Johns Hopkins University, with a smattering of A’s and a lust for leadership, he was a social and political star — the president of his fraternity, his senior class and the council overseeing Greek life. “An all-around big man on campus,” as he puts it.

His gratitude toward the university, starting with a $5 donation the year after he graduated, has since taken on a supersize, Bloombergian scale.

On Sunday, as he makes a $350 million gift to his alma mater — by far the largest in its history — the New York City mayor, along with the president of the university, will disclose the staggering sum of his donations to Johns Hopkins over the past four decades: $1.1 billion.