You have to pay yourself a reasonable salary, that's true. The IRS mandates this so that S-Corp owners don't totally avoid social security and medicare taxes, known as the self-employment tax for many small business owners (partnerships and Schedule C's)
To answer your question. If you take $ 18,000 in salary and an $ 18,000 "distribution" (akin to a draw), you'll save approximately 15% of the $ 18,000 (or $ 2,700) in FICA and Medicare tax. There will be a small giveback on unemployment taxes, but you'll net over $ 2,000 in tax savings. Both wages and your $ 18,000 distribution are taxed at the same rate for federal income tax purposes, whatever your marginal rate may be.
Now let's assume the same numbers as above, but you take a distribution for $ 20,000. Assuming you had no basis (I'll call it equity for the sake of conversation) at the beginning of the year, then you have a $ 2,000 capital gain.
$ 36,000 profit less $ 18,000 salary leaves $ 18,000 to be distributed without additional tax consequences. Since you took $ 20,000 in this example, the excess distribution is a capital gain. You want to AVOID doing this if you can.
Obviously, the more you make the greater the savings. I'll almost always advise this path if a business owner makes $ 100,000 or more every year, taking $ 50,000 in distribution will save around $ 7,000 in payroll taxes. There are other pitfalls to watch, basis and at risk limitations become more restrictive with S-Corps, and the amount you can contribute to stuff like retirement plans is subject to wage limitations (distributions don't count as income for retirement plan purposes)