So. I have recently spent about 5 full focussed days to crank out about 1k - 4k lines of code (can't check at the moment, vacation), which will save our operations team at least 3-4 full days per month. How much will each line of cost count? 4k / (my hourly payment * 40 hours)? 4k / ((my hourly payment - the average hourly payment of our operational team) * 40 hours)?
What about we include the fact that the new system is less frustrating to operate than the last one? What about the fact that the new system is more stable and saves frustration and plain time (since it just works and people don't get blocked in their workflow) in our software development team?
So, overall, point being: I don't see it feasible, or even possible, to calculate the full monetary impact of a line of code in a medium to large company.