I am currently a mathematics lecturer at a state university in the US. I still do research and put a lot of effort into publications, although it is not required for my position. My question is: Will my publications (in good journals) be seen as a positive by the math department and/or university overall? Do they gain any benefits from my research? Is there some baseline for number of publications that they need to meet for funding, etc?
(Although OP is in the US, the question doesn't have a "united-states" tag, so...)
In England and Wales, there's a pot of government money called "QR funding", which is allocated to universities in proportion to the quality and quantity of their faculty members' research publications, as measured in an episodic exercise called "REF".
The publications of faculty add to the reputation of a university, more specifically, to a department. But there is no direct effect. In funding for a particular project it will help if they can show productive activity in that area and your papers might be cited. Likewise having research seminars in a topic is helpful. But there aren't cutoffs or similar.
Regular faculty are in a good position for getting salary increases and/or reduced teaching loads, but this is probably less available to a lecturer. But it might give you an edge in a number of ways. It might not be possible to bypass regular procedures to hire you for a TT position, but people will look favorably upon an application. Likewise, if you work collaboratively with the tenured faculty you will be in a good position to get good letters when it is time to move on.
So, benefits: yes. Formulas: no.
One positive side-effect of your publications pertain to world university rankings.
All such higher education rankings I know of take into account the number of scholarly publications (and citations to these publications). They do so in two ways:
First, as inclusion criteria for institutes to be listed in a ranking (e.g. the THE World University Ranking demands more than 150 publications in a single year [p. 6]; or the CWTS Leiden Ranking ranks universities only if they have at least 800 publications in 2015-8 [see here]).
And secondly, publications (and citations) serve as as core performance indicators. For instance, publications weigh 20% of a journal's score in the Shanghai Ranking (according to their Ranking Methodology).
And these university rankings, in turn, have their real-life impact - as many studies show.