but the original idea of a chair rail was to actually guard the wall from the rubbing of a too close chair back hitting the wall. So, It could be between 36 inches to 42 inches, depending.
I think that rails too high make the room look smaller and like a lawyer's office, lower is more friendly and warm. But if you have actual chairs with backs in that room and intend to keep them there, the rails should be functional.