Leonard Evens , Jul 20, 2003; 09:29 a.m.
It depends on what you mean by 18 percent gray, If you take that to be middle gray and make plausible assumptions about the gamma of the monitor, then in principle you should take the middle values for RGB, i.e, R=G=B=127 fo a scale of 0 to 255. But that is unlikely to look on the screen like a gray card you hold up next to it under normal lightling. The card is likely to look darker. Also, if you print normally, you are not going to get something that looks like the gray card.
The math goes as follows. The native gamma of a typical CRT is 2.5. The light intensity on the screen is roughly the relative value raised to the gamma power. 127/255 ~ .5, and .5 raised to the 2.5 power is about .18 or 18 percent. However, the human visual system tends to exaggerate responses based on viewing conditions. For viewing a TV screen or monitor, there is an adjustment for gamma to compensate for this, so one is usually advised to set a PC monitor's gamma to 2.2. Since .5 to the 2.2 is about 22 percent, that is brighter than the expected 18 percent, but if you are looking at a step wedge on the screen and want the .5 value to appear to be in the middle, you are better off with the smaller gamma.
At least this is what I've managed to glean from reading Poynton and other technical notes on the subject.