as the others said, the percentage is different from location to location but 50 % for the club is usually the high end. You may be able to negotiate a flat fee to pay the gym regardless of the number of clients you train. I had such an arrangement years back and only needed to add a guest fee if my clients were not members of the club.
I have never seen an arrangement where classes were conducted on a fee base for an independent trainer.
Remember, though, that you need to carry your own liability insurance if you are an independent trainer.