What's the minimum height for the spawning area of a mob farm?

This depends on many factors, including your position as a player and the type of terrain around you.

Mobs will despawn when they are out of a 128 block radius of the player.

This means that for the spawner to be active if the player is anywhere within 128 blocks at the spawner's level, it has to be at least 128 blocks above the ground. This works for pretty much any generic mob farm, and it works in a populated server. Having blocks in an area above level y128 can decrease efficiency of mob spawning, since it has to account for more chunks, though, so here are some other options:

If you want to make a less tall, but still efficient design you can locate the player above the farm so that the despawn radius includes the spawner but excludes the rest of the world. Note that this design is better suited for AFKing, since you will have to make many trips up and down for this to work. This can be used for witch farms, as well as hostile mob farms.

You can also "sanitize" a 128 radius area, by lighting up every cave and surface you can find. This is obviously quite tedious, but it can allow for a ground-level farm that is active no matter where the player is. This works for witch farms as well, and is probably your best efficiency if you are playing on a server.


If your concern is solely limited to other hostile mobs lowering your grinder's efficiency, then quoted from minecraft wiki,

Hostile mobs (and some others) that move farther than 128 blocks from the nearest player will soon despawn (see Despawning), so even with a larger chunk loading radius, the mob spawning area is more-or-less limited to spheres with a radius of 128 blocks, centered at each player.

What this means is that to get 100% efficiency, you should build 128 blocks above the tallest terrain you are at. ie 128 blocks about ground level.