If the tax rate is r%, your gross pay (before tax) is P, and your net pay after tax N, then the formula to remember is:

N = P(1-r).

For example if your gross pay is 10000, and tax is 25%. then your net pay is 10000(1-.25) = 7500.

Now let's turn it around. You can rearrange the above formula to get P by itself:

P = N/(1-r)

So - if net pay is 23000, tax rate is 25%, then gross pay is 23000/(1-.25) = 23000/0.75 = 30667.