An is the number of drinks consumed, limited only by your bodily fortitude.
d is the distance in meters between you and the object of your potential lust.
S is the smokiness of the room, rated between 0 and 10.
L is the brightness of the room, rated between 1 and 150.
Vo is a measure of your visual acuity, 6/6 being normal and 6/12 being "maced in the face."
"Oh yeah. This is probably a good decision."
If the result is less than 1, there's no beer goggle action at all. With 50 and higher, we begin to see a clear effect. If we test this with a single drink, a half-meter distance, clear air, good lighting and perfect vision, then the object appears in all its horrible glory.
However, if the guy just chugged eight beers and there's a three-meter distance, poor lighting and a smoky room, and he forgot his contact lenses, everyone is beautiful.
Surprisingly, alcohol alone doesn't seem to produce much of an effect if we ignore the other factors. With a clear, well-lit room and good vision, we plugged eight beers into the equation and only got 2.6. After 15 beers, it's still only 9 (if our math is wrong, someone will surely correct us in the comments). According to this, the secret isn't so much to go easy on the booze, just to make sure you stay in the non-smoking section and carry a flashlight.
Or do your drinking in the well-lit halls of hospitals and mental institutions.