Back to Tools
Server tools

Minecraft Server RAM Calculator

A Minecraft server RAM calculator for Java Edition: pick players, server type, view distance and mods to get a heap size estimate.

How much RAM does your server need?

A rule-of-thumb estimate, not a measurement

chest
Java Edition server heap
Verified for Minecraft 26.3 ·
Server type
Players online at peak 20
View distance (chunks) 10
Plugins installed 20
Recommended heap
5 GB
Range 4 to 6 GB · raw estimate 4.2 GB · host with at least 6.5 GB of RAM
-Xms5G -Xmx5G
Build the full start script with 5 GB in the JVM flags generator

PaperMC's Aikar's flags guide recommends at least 6-10 GB no matter how few players. The figure above is what this setup is likely to use. Treat the guide's number as the comfortable target if your host gives you the memory.

The server RAM formula

Every constant, so you can disagree with it

There is no official formula. This is a rule of thumb, and the constants below are estimates chosen for this tool, not measurements. Treat the result as a starting point and check it against your own server's memory use.

heap = base + players × per_player × ((2 × view + 1) / 21)² + extensions × per_extension + world
Server typeBasePer playerPer plugin or mod
Vanilla768 MB100 MBn/a
Paper / Purpur1536 MB100 MB15 MB
Fabric / Forge, light mod set2048 MB120 MB15 MB
Heavy modpack4096 MB150 MB12 MB

World size adds 0 MB for a small or new world, 512 MB for a medium one and 1024 MB for a large one. The result is rounded up to a size hosts sell (1, 2, 3, 4, 5, 6, 8, 10, 12, 14, 16, 20, 24, 32 GB), with a 1 GB floor and a 32 GB cap. The range runs from 80% to 130% of the estimate.

How the server RAM estimate works

What the inputs mean, what is sourced and what is not

What is sourced. minecraft.wiki's server requirements page lists a hardware table for a vanilla server on default settings in a new world: 1 GB for 1-4 players, 2 GB for 5-10 and 4 GB for more than 10. It also says a player object takes about 50 to 100 MB, that the server often has to allocate much more per player, and that growing world size and high draw distances increase RAM use. The vanilla row of this calculator is tuned to land near that table at view distance 10, and the 100 MB per-player figure is the top of the wiki's range.

Why view distance is squared. A player loads a square of chunks, (2 × view + 1) on each side. Going from the default of 10 to 16 loads about 2.5 times as many chunks per player. view-distance accepts 3 to 32 and defaults to 10 on Java Edition, so 10 is the reference this calculator scales from. The per-player cost is the only part that grows with it.

What is not sourced. Plugin and mod costs, the base for each server type and the world-size allowance are rule-of-thumb choices. Mods vary enormously: a single large mod can outweigh fifty small ones. If you run a heavy modpack, start from the pack author's own recommendation and use this as a sanity check.

Worked example for Minecraft 26.3. A Paper server with 20 players at peak, view distance 10, 20 plugins and a medium world: 1536 MB base, plus 20 × 100 × 1 = 2000 MB for players, plus 20 × 15 = 300 MB for plugins, plus 512 MB for the world. That is 4348 MB, about 4.2 GB. Rounded up to a size hosts sell, the recommendation is 5 GB, with a range of 4 to 6 GB. Raise the view distance to 16 and the player part becomes 2000 × 2.47 ≈ 4939 MB, so the same server now wants 8 GB.

Java Edition only. The heap flags apply to the Java server. Bedrock Dedicated Server is not a Java program, so -Xmx does not apply to it.

More RAM is not always the fix

Where extra memory stops helping, and when the CPU is the limit

PaperMC's Aikar's flags guide says more memory does not mean better performance above a certain point, and that if the server does not need the memory it is given, it does not use it. The extra heap buys nothing and costs money or host RAM you could use elsewhere.

Lag spikes from garbage collection come from how the collector is tuned, not from the heap size alone. The same guide notes that MaxGCPauseMillis=200 aims for at most about four ticks lost, and that plugins calling System.gc() trigger a full collection and a large lag spike, which -XX:+DisableExplicitGC avoids. The JVM flags generator covers those flags.

Do not hand the JVM all of the machine's RAM. The guide says to reduce -Xms and -Xmx by about 1000-1500 MB from what the host advertises, for the operating system and memory outside the heap. The guide also says to keep -Xms and -Xmx equal under G1.

If the server lags while the heap has room, look at the CPU. minecraft.wiki says the server does the majority of its processing on one core, so single-core speed matters most, and that mob and redstone farms use a lot of CPU. Dropping simulation-distance in server.properties reduces how many entities are ticked.

More server tools

The rest of the set, for the parts of the server this one doesn't touch

Frequently asked questions

Heap size, -Xms and -Xmx, and when RAM is not the problem

How much RAM does a Minecraft server need? +

It depends on players, server software, view distance, plugins or mods and world size. For a vanilla server on default settings, minecraft.wiki lists 1 GB for 1-4 players, 2 GB for 5-10 and 4 GB for more than 10. Paper and modded servers need more, because plugins and mods add their own memory use.

How much RAM do I need per player? +

minecraft.wiki says a player object takes about 50 to 100 MB, and the server often allocates much more per player. This calculator assumes 100 MB per player on vanilla and Paper, up to 150 MB on a heavy modpack, scaled by view distance. Players per GB therefore shifts with view distance and server type.

How much RAM does a modded Minecraft server need? +

More than vanilla. The estimate starts from a 2048 MB base for a light Fabric or Forge set and 4096 MB for a heavy modpack, then adds a per-mod cost. These are rule-of-thumb figures, not official ones. For a big modpack, start from the pack author's recommendation and use this as a sanity check.

Is this Minecraft server RAM estimate official? +

No. Mojang does not publish a RAM formula, and neither do the server projects. The calculator uses a rule of thumb: a base cost for the server type, a per-player cost scaled by view distance, a per-plugin or per-mod cost and a world-size allowance. The constants are shown on the page. Check the result against your own server's memory use.

What should I set -Xms and -Xmx to? +

Set both to the same value. PaperMC's guide calls matching them the accepted advice under G1, because a lower -Xms leaves memory unused. Use the recommended heap from this calculator, then leave roughly 1-1.5 GB of the host's RAM for the operating system and non-heap memory.

Last verified for Minecraft 26.3