They get more. The student gets about 25K, plus the benefits cost about 5K, and tuition is near 20K per year. The University gets overhead on the salary and bennies (but not the tuition), which amounts to an additional 18K-ish.
I’m generally funded by the NIH, which throws the overhead on top of the direct costs, so I don’t have to worry about that 18K coming out of my research budget, but other funders don’t do that.
So the University, for one grad student making 25K per year, gets almost 40K in money from tuition and overhead.
None of this includes the money the student will need for actual research supplies, equipment, travel, etc…
Postdocs make about 55K per year (more in some cases). Bennies are another 14K or so. Overhead to the University is about 40K.
So the Uni gets about the same to them for a student or postdoc, just split in different ways - which does affect where the money goes in upper admin. My College wants me to put tuition on the grant because they can keep those dollars, while overhead goes to central admin and the college only sees 12% of it. So the college makes more money off tuition.
End result, postdocs cost a bit more than a grad student but not orders of magnitude more.
For my back of the envelope budgeting, I budget 100K per year in direct costs (not including the overhead) for any researcher in my lab, which includes salary, bennies, tuition (if a student), and research supplies. The devil is in the details of course but as a rule of thumb it seems to work.