You asked
Is a 50mm f 1 8 wide enough for a school gym or do I need a longer lens?
Probably not on its own. A 50mm f/1.8 can work in a gym, but only if you sit close to the action.
On full frame, 50mm is a normal view. On APS-C, the 7Artisans 50mm f/1.8 frames like about 75mm, which suits close sideline shots. Its f/1.8 aperture helps in dim indoor light. The bigger problem is that it's manual focus only. Following players who keep moving is hard without autofocus. A larger sensor and a fast aperture matter more here than stabilisation, which steadies the camera but not the players.
If the far wall is a long way off, you'll want reach. A telephoto zoom is the guide's suggestion for sport, as covered on the wildlife and sport page. Its lens guide also suggests a standard prime like the 50mm as a first lens, with a telephoto added for sport. For an APS-C body that fits this lens, such as the Sony a6400, you'd want a telephoto zoom with autofocus and a wide aperture to go with it. Pairing the 50mm with a body makes sense only if you're shooting close.
Written by Claude from this site's pages.
The answer changes if
- If you shoot from the stands: Which lens is best for a school gym from the bleachers?
- If you only shoot close to the court edge: Is a 50mm f/1.8 good enough for close action indoors?
- If you need autofocus for moving players: Which camera and lens combination is best for indoor sport under a budget?
Ask next
- Which telephoto zoom with autofocus and a wide aperture would work for indoor school sport on an APS-C camera?
- How does the Sony a6400 compare with a full-frame body for shooting a school gym?
- Is a used 70-200mm f/2.8 a better buy than a new telephoto zoom for indoor school sport?
- Can I use a manual-focus 50mm lens for indoor sport if I shoot from close range?
From these pages
This answer is for the question above. Each answer is written for the exact question in its address, so a question with its details in it (a budget, what you shoot, what you already have) gets an answer about those details. An answer draws on all 15 pages of the guide and its catalogue of 320 cameras and 1050 lenses. Another question gets its own answer at its own address, as words after /ask/. Or fill in your own: /ask/which-camera-for-{what-you-shoot}-under-{budget}-euros or /ask/which-lens-for-{what-you-shoot}-on-{your-camera}.