RAM Calculator
Find out exactly how much memory your Minecraft server needs and get optimized JVM startup flags.
World size multiplier applied: 1.1x
Aikar's optimized G1GC flags for Minecraft servers
-Xms4G \ -Xmx4G \ -XX:+UseG1GC \ -XX:+ParallelRefProcEnabled \ -XX:MaxGCPauseMillis=200 \ -XX:+UnlockExperimentalVMOptions \ -XX:+DisableExplicitGC \ -XX:+AlwaysPreTouch \ -XX:G1NewSizePercent=30 \ -XX:G1MaxNewSizePercent=40 \ -XX:G1HeapRegionSize=8M \ -XX:G1ReservePercent=20 \ -XX:G1HeapWastePercent=5 \ -XX:G1MixedGCCountTarget=4 \ -XX:InitiatingHeapOccupancyPercent=15 \ -XX:G1MixedGCLiveThresholdPercent=90 \ -XX:G1RSetUpdatingPauseTimePercent=5 \ -XX:SurvivorRatio=32 \ -XX:+PerfDisableSharedMem \ -XX:MaxTenuringThreshold=1 \ -Dusing.aikars.flags=https://mcflags.emc.gs \ -Daikars.new.flags=true
How to work out how much RAM a server needs
Pick the server type
Vanilla, Paper, Fabric, Forge, NeoForge, a heavy modpack and a proxy each start from a different base heap.
Set players and plugins
The two sliders add memory per connected player and per plugin or mod, which is where most of the growth on a busy server comes from.
Say how big the world is
World size applies a multiplier to the running total, and the extra features are added on top of that.
Read both numbers
Minimum is the raw sum. Recommended adds thirty percent of headroom, and the flags underneath are the set that fits that size.
How It Works
Calculate how much RAM your server needs based on players, plugins and mods.
This tool's own heap table and the Aikar G1GC flagsPage updated
How Much RAM Does a Minecraft Server Need?
The amount of RAM your Minecraft server requires depends on several factors: the server software you run, how many players connect simultaneously, the number of plugins or mods loaded, your world size, and any extra features such as Dynmap or custom terrain generation.
A Vanilla server can start with as little as 1 GB for a handful of friends, while a heavily modded Forge or NeoForge instance with 100+ mods may need 8 GB or more. Paper and Spigot servers are more memory-efficient than Vanilla thanks to performance patches, but every plugin you add increases the footprint.
This calculator estimates both the minimum and the recommended amount of RAM. The recommended value includes a 30% headroom buffer so the garbage collector has room to work without causing lag spikes. It also generates the correct JVM startup flags: Aikar's optimized G1GC flags for allocations under 12 GB, or ZGC flags for larger servers running Java 21+. That headroom is sized around the players you expect, so if that number is a guess, the player slot advisor derives it from your cores, software and plugin count.
Proxy servers like BungeeCord and Velocity are lightweight and only need around 512 MB base plus roughly 15 MB per connected player, since they do not load worlds or run game logic themselves. Whether that much RAM is worth its price is a separate sum, made by the hosting cost calculator, and the settings that decide how much of it a world actually touches sit in the server.properties generator.
The numbers this calculator uses
| Base heap | Vanilla 1024 MB, Paper 1536, Fabric 1536, Forge 2048, NeoForge 2048, a heavy modpack 4096, a proxy 512. |
|---|---|
| Per player | Vanilla 40 MB, Paper 50, Fabric 45, Forge 60, NeoForge 60, modpack 80, proxy 15. |
| Per addon | 8 MB for a plugin, 15 MB for a mod. A mod loads content, a plugin usually only reacts to it. |
| World size | A medium world adds 10 percent, a large one 25, a massive one 50, on top of everything above. |
| Recommended against minimum | The raw figure plus 30 percent, rounded up to the nearest half gigabyte, so there is headroom before the garbage collector starts working hard. The headroom goes on before the rounding, so it is not always the minimum plus exactly 30 percent. |
| Flags | Below 12 GB the copy button gives the Aikar G1GC set. At 12 GB and up it switches to generational ZGC, which handles a large heap with far shorter pauses. |
No game file backs these megabytes. The base heap, the amount per player and the world multipliers are this tool's own table, printed above the outcome, and the flags come from the Aikar G1GC set that Paper's own start command points at.
The arithmetic, step by step
The calculator runs one expression. It is printed here so you can redo it by hand, or disagree with it.
raw MB = (base + players x per player + plugins x 8 + mods x 15 + features) x world multiplierminimum GB = ceil(raw MB / 1024 x 2) / 2recommended GB = ceil(raw MB x 1.3 / 1024 x 2) / 2A proxy is the one line that breaks the pattern: 512 MB base and 15 MB per player, because it forwards traffic and never loads a chunk. Its memory grows with connections, not with the world.
Frequently Asked Questions
Questions about server memory
Why does the flag output set Xms and Xmx to the same value?
So the heap never has to grow. A resize is a stop the world moment, and pinning the minimum to the maximum with AlwaysPreTouch pays that cost once at startup instead of during play.
Is more RAM always better?
No. A bigger heap means more to scan, so pauses get longer rather than shorter once the collector is the bottleneck. That is exactly why the flags here switch collector at 12 GB instead of just raising the number.
Why does a proxy need so little?
Because it holds no world and no entities. A proxy moves packets between backend servers, so its 512 MB base and 15 MB per player are almost entirely connection state.
Does this number include the operating system?
No, it sizes the Java heap only. The machine also needs room for the JVM itself and for the system, so buy at least a gigabyte more than the figure shown here.
Embed This Tool
Put the ram calculator on your own site or server wiki.
<iframe src="https://tools.astroworldmc.com/embed/ram-calculator" width="700" height="650" frameborder="0" style="border:none;border-radius:12px;" loading="lazy" title="RAM Calculator"></iframe>
