Think of it this way. Look at a company's overall profit margins - the profit they are making off of your labor / work should fall within this ballpark. If it's not, you're being ripped off, because that means other employees (or shareholders) in the firm are capturing a larger share of the value you create than you are, compared to the average.
This is really, really, REALLY simple math, folks.
No. Learn something very few other people know and it will explain itself.
IOW, company had a net margin of 10%. Your project makes $1M/yr revenues and the company claims $200,000 revenue on that, a profit margin of 20%. You figure that they should reallocate half of that $200k to you so that you are paid commensurate with your contribution and they keep the remaining 10%?
That makes sense and I suppose the math is pretty easy in a smaller corporation or with a specialized product.