How is child support calulated

Question- how is child support calulated if every year your salary is different? Example: I have a base salary of XYZ but every year my commission is different. Over the past 5 years my commission has decreased- this year will be even less and next year I am sure less- so how can the court tell me I have to pay XYZ based on past W-2’s- I am in sales and with the way the economy is, it is only going to get worst.

I want to come up with the correct figure- would I use my base and average the commission over the past 5 years, 2 years? Can anyone tell me?

Sometimes the courts do take an average of income over the past 3 years, I am seeing now courts are also basing support on base salary and ordering that the percentage income a parent pays in support become the percentage gross bonus paid as support if an when the bonus is awarded.