This erasure coding calculator shows what a k+m scheme costs and protects: capacity efficiency, overhead, how many failures it survives and how many nodes it needs. It sets the result beside n-way replication and works out the raw capacity you must buy for a given usable size. Use it to compare schemes such as 4+2, 8+3 and 10+4 before you design an object or scale-out cluster.
Result
The result updates automatically as you change any input.
Formula and worked steps
Formulas used
- Chunks per stripe n = k + m
- Efficiency = k / (k + m)
- Overhead = m / k
- Tolerates the loss of any m chunks
- Minimum failure domains = k + m
- Raw per usable = (k + m) / k
- Savings vs c-copy replication = 1 - ((k + m) / k) / c
- One chunk per node or failure domain; losing a domain loses one chunk.
- Classic Reed-Solomon repair reads k chunks to rebuild one, so repair traffic is higher than replication. Some codes reduce it at a capacity cost.
- Small objects, partial-stripe writes and metadata add overhead beyond this arithmetic.
What is erasure coding?
Erasure coding splits data into k data chunks and adds m parity chunks, so that any k of the k+m chunks can rebuild the data. It spreads each stripe across nodes, so the loss of up to m chunks is survivable.
Data and parity chunks
In a k+m scheme, k chunks hold data and m chunks hold parity computed from it. An 8+3 scheme writes 11 chunks per stripe. Any 8 of them can reconstruct the stripe, so three can be lost.
Efficiency and overhead
Efficiency is the share of raw capacity that holds user data: k divided by k+m. Overhead is the extra space compared with the data: m divided by k. An 8+3 scheme is 72.7% efficient with 37.5% overhead.
Compared with replication
Replication stores complete copies. Three copies tolerate two losses but are only 33.3% efficient, with 200% overhead. Erasure coding reaches similar or better tolerance with much less raw capacity, at the price of more computation and more complex repair.
How the erasure coding calculator works
Enter k and m, the number of replication copies to compare with, and optionally the usable capacity you need and the number of nodes you have. The tool computes everything from those few numbers.
Formulas
- Chunks per stripe = k + m
- Efficiency = k / (k + m)
- Overhead = m / k
- Failures tolerated = m
- Minimum failure domains = k + m
- Raw capacity per usable = (k + m) / k
- Saving against c copies = 1 – ((k + m) / k) / c
Worked example: 8+3 against 3x replication
An 8+3 scheme is 72.7% efficient with 37.5% overhead, tolerates 3 failures and needs 11 nodes. Three-way replication is 33.3% efficient and tolerates 2. For 100 TB usable, 8+3 needs 137.5 TB raw and replication needs 300 TB. The erasure coded layout saves 54.2% of raw capacity and survives one more failure.
Worked example: 4+2
A 4+2 scheme is 66.7% efficient with 50% overhead, tolerates 2 failures and needs 6 nodes. Against three copies it saves 50% of raw capacity at the same failure tolerance, which makes it a common choice for smaller clusters.
Node count
Each chunk of a stripe should be on a different failure domain, so the cluster needs at least k+m nodes. With 12 nodes an 8+3 scheme has one spare. With 10 nodes it cannot be placed safely, and the tool says so. Extra nodes beyond k+m give room to rebuild without waiting for a replacement.
Chunk size and stripe width
Each stripe holds k times the chunk size of user data. Objects smaller than a stripe are padded or stored another way, depending on the system, which can raise real overhead above the arithmetic here. Check how your platform treats small objects before you trust the efficiency figure for a workload full of them.
Repair cost
With classic Reed-Solomon codes, rebuilding one lost chunk means reading k chunks. For 8+3 that is eight reads to restore one, where a replica needs a single read. Repair traffic and time are therefore higher, and some codes lower the cost at the expense of some efficiency.
Why it matters for SAN and storage admins
Capacity is the largest cost in many scale-out and object systems, and the protection scheme sets how much raw capacity each usable terabyte needs. The erasure coding calculator makes the efficiency gain concrete and shows that the saving is not free. The nodes, the compute and the repair behaviour all change.
It also frames the design choice. Wide schemes such as 10+4 reach 71.4% efficiency but need 14 nodes and read ten chunks for each repair. Narrow schemes such as 4+2 need fewer nodes and repair faster, but spend 50% overhead. The right answer depends on cluster size, failure rates and workload.
Use it when you:
- Compare protection schemes for a new cluster.
- Estimate raw capacity from a usable requirement.
- Check whether a cluster has enough nodes for a scheme.
- Explain the cost of durability to non-specialists.
Best practices and common mistakes
- Match the scheme to the cluster. You need at least k+m failure domains, and spares beyond that.
- Count the failure domain correctly. If a chassis or rack can fail, chunks must be spread across those, not only across drives.
- Plan for repair traffic. Rebuilds read k chunks per lost chunk, which loads the network and disks.
- Check small-object and partial-write behaviour. Many systems replicate small objects or add overhead for them.
- Keep the scheme consistent with your durability target, and know how many simultaneous failures it tolerates.
- Test a failure and watch the rebuild before you rely on the scheme.
A frequent mistake is to compare efficiency alone. A scheme that is 5 points more efficient but needs twice the nodes and repair traffic may be the worse design for a small cluster.
FAQs
How do you calculate erasure coding efficiency?
Divide k by k plus m. An 8+3 scheme has 8 data chunks and 3 parity chunks, so efficiency is 8/11, or 72.7%.
How many nodes does erasure coding need?
At least k plus m failure domains, so each chunk of a stripe is on a different node. An 8+3 scheme needs 11.
Why is erasure coding repair more expensive than replication?
Rebuilding one lost chunk with classic Reed-Solomon coding reads k chunks, while a replica needs only a copy of one.
Next, try the RAID calculator, the RAID rebuild time calculator and the TB to TiB converter, or browse the full list of storage calculators.