Problem: I need a formula to determine what my salary cap should be set as.

League information

20 team dynasty

23 players

MLB contracts

(Arod will cost 28 mil against the cap because he makes 28 mil a year.)

(Players making the league minimum will cost 1 mil a year.)

Also we may be adjusting roster size each year.

I need a formula to adjust for rising MLB contracts each year.

I think I'm looking for something like...

W Z

Y X

W = Roster size

Z = Average Team Salary

Y = Total used players revenue

X = Salary Cap

I probably need a rocket scientist for this one, but if anybody could help me I would be incredibly grateful.