Written and maintained by CASRAI Editorial Board
Last updated
N50 is the standard contiguity statistic reported for a genome assembly: a single number meant to summarize how fragmented or how contiguous the assembled sequence is. It is widely quoted in assembly papers and software output, and just as widely misread — it is not the median contig length, not the mean contig length, and on its own it says nothing about whether the assembly is correct. This guide walks through the actual calculation, why a higher N50 is a reasonable (but limited) contiguity signal, and why assembly-QC methodology consistently pairs N50 with a completeness check (BUSCO) and a reference-based accuracy check before drawing any conclusion about assembly quality — the same read-type and downstream tradeoffs covered in choosing a de novo assembler in the first place.
What N50 Actually Measures
N50 is defined as the length of the contig (or scaffold) at which 50% of the total assembly length is contained in contigs of that length or longer. Operationally: sort every contig from longest to shortest, keep a running cumulative total of their lengths, and find the contig where that cumulative total first reaches half of the assembly’s overall size. That contig’s length is N50.
This is a deliberately different calculation from a median or mean contig length, and the difference matters:
- Mean contig length is the total assembly length divided by the number of contigs — every contig, including very short ones, is weighted equally regardless of how much sequence it actually contributes.
- Median contig length is the middle value in a list of contigs sorted by length — again, one contig, one vote, regardless of size.
- N50 weights contigs by the sequence they contain, not by their count. A handful of long contigs and a long tail of short, low-information fragments (a very common shape for a real assembly) can still produce a respectable N50, because that N50 calculation is answering “how long is the contig that anchors the median base pair,” not “how long is the median contig.”
A Worked Example
Take six contigs with lengths 100, 90, 70, 60, 50 and 30 kb — a total assembly length of 400 kb. Half of that total is 200 kb. Sorting longest to shortest and summing: 100 (running total 100), +90 (190), +70 (260). The cumulative total crosses 200 kb at the third contig, so N50 = 70 kb. Note that the median contig length here is 65 kb and the mean is about 66.7 kb — both close to N50 in this small, evenly-shaped example, but that convergence is coincidental to this particular size distribution, not a general property. Real assemblies are rarely this evenly shaped: a few chromosome-arm-scale contigs next to thousands of sub-1 kb fragments will pull the mean and median down far below N50, which is exactly why N50 is the number reported, not the average.
NG50 and L50
Two related statistics refine what N50 alone can’t say:
- NG50 runs the identical calculation against the estimated or expected genome size instead of the assembly’s own total length. This distinction matters: an incomplete assembly that is missing large chunks of the genome can still post an inflated N50 relative to its own (too-small) total length, while NG50 — anchored to the real genome size — exposes that shortfall.
- L50 is the complementary count: the minimum number of contigs needed to reach that 50% cumulative-length threshold. A low L50 alongside a high N50 both point the same direction (few large pieces); they are read together as a sanity check, not derived independently.
Why a Higher N50 Generally Indicates Better Contiguity
A higher N50 means fewer, longer contiguous stretches of assembled sequence make up half the genome — the payoff for the read-length and depth choices made back at the sequencing stage. In practice it means fewer places where the assembler gave up and left a gap: fewer breaks at repetitive elements, low-coverage regions, or heterozygous sites the assembly graph couldn’t resolve. For most downstream uses — annotating full-length genes, studying synteny and structural variation, anchoring scaffolds to chromosomes — a chromosome-scale or near-chromosome-scale N50 is far more usable than an assembly broken into tens of thousands of short contigs, even if both technically contain “the same” total sequence. This is the entire reason N50 became the default headline statistic in assembly papers and software reports: it is a fast, reproducible proxy for “how much of this genome came out in one piece.”
Why N50 Alone Is a Poor Measure of Assembly Quality
The word “alone” is the load-bearing part of that sentence. Assembly-evaluation literature — most visibly the Assemblathon 2 benchmarking study, which scored dozens of independently produced assemblies of the same species side by side — found that ranking assemblies purely by N50/NG50 can be actively misleading: one bird assembly ranked near the bottom on NG50 but still packed 99.2% of the estimated genome into gene-sized (≥25 kb) scaffolds, making it perfectly usable for annotation despite its unimpressive N50. The same study also found that scaffold N50 and contig N50 can diverge sharply within a single assembly — two assemblers can report near-identical scaffold N50 while their underlying contig N50 differs by nearly threefold — which means quoting scaffold N50 alone can mask a much rougher contig-level assembly sitting underneath the scaffolding.
Three specific blind spots explain why:
It says nothing about accuracy
N50 is computed purely from contig/scaffold lengths — it has no mechanism for detecting whether a contig’s sequence is actually correct. A misassembly (two genomic regions incorrectly stitched into one contig, an inverted segment, sequence from the wrong chromosome joined in) produces a longer contig, which raises N50, while making the assembly less correct, not more. Reference-based evaluation tools such as QUAST address this directly by aligning the assembly to a reference genome and classifying misassemblies into categories — relocations (flanking sequence aligns to positions on the reference more than 1 kb apart, or overlapping, from where contiguous sequence implies they should be), translocations (flanking sequence maps to different reference chromosomes or strands), and inversions — none of which N50 can see.
It says nothing about completeness relative to the true genome size
Two assemblies can report similar N50 while one is missing 20% of the genome’s actual gene space and the other isn’t — N50 characterizes the shape of whatever sequence made it into the assembly, not whether that sequence represents the whole organism. This is exactly what NG50 partially corrects for (by anchoring the calculation to expected genome size rather than assembly size) and what a gene-content completeness check, described below, is designed to catch directly.
It can be gamed by assembly parameters
Because N50 rewards length regardless of correctness, assembly and scaffolding parameters that favor aggressive, low-support joins — bridging gaps on thin evidence, greedily merging repeat-flanked contigs, or scaffolding across ambiguous long-read overlaps — will tend to increase N50 by producing longer, but more chimeric, contigs. A pipeline tuned purely to maximize the reported N50 is, in effect, being tuned to accept more misjoins in exchange for a better-looking headline number. This is precisely why an N50 figure reported without any accompanying accuracy check is a weak basis for comparing assemblers or assembly runs — it can favor the more aggressively (and less carefully) joined output.
Complementary Metrics: What to Report Alongside N50
Assembly-QC methodology treats N50 as one leg of a three-legged stool: contiguity, completeness, and accuracy, evaluated separately because each blind spot above needs a different tool to close it.
Completeness: BUSCO
BUSCO (Benchmarking Universal Single-Copy Orthologs) searches the assembly for a curated, lineage-specific set of near-universal single-copy orthologous genes (drawn from the OrthoDB reference database) and scores each as complete, duplicated, fragmented, or missing. A high proportion of complete single-copy BUSCOs indicates the assembly captured most of the expected gene space regardless of how contiguous it is; a high duplicated rate is a specific, actionable diagnostic — it typically points to collapsed repeats mis-assembled as separate copies, retained haplotype duplication, or contamination — that a contiguity metric has no way to surface at all.
Accuracy: reference-based and read-mapping checks
Where a reference genome (even a related species’) is available, tools such as QUAST align the assembly against it — the same kind of alignment-format workflow used for read mapping generally — and report the misassembly categories described above, plus per-base identity and coverage of the reference. Where no reference exists, a read-mapping-based check — re-aligning the original sequencing reads back against the finished assembly (typically stored as a BAM file) and looking for regions of anomalously low or spiking coverage depth, or an excess of discordant/split read pairs — surfaces likely misassembly breakpoints without needing an external reference at all. Neither check is optional if the assembly is going to be used for anything beyond a rough size/contiguity estimate.
Reporting convention
The practical standard in assembly papers and pipelines is to report N50 (or NG50) alongside a BUSCO completeness score and, wherever feasible, a reference-based or read-mapping accuracy summary — never N50 by itself as a stand-in for “quality.” A fragmented assembly (low N50) can still be gene-complete and structurally accurate for many analyses; a highly contiguous one (high N50) can still be missing gene content or riddled with misjoins if the underlying read data, coverage, or assembly parameters were wrong for the sample.
A Short Assembly-QC Checklist
- Report contig N50 and scaffold N50 separately — don’t quote one and imply it describes the other.
- Report NG50 against an independently estimated genome size where one exists, not just N50 against the assembly’s own total length.
- Run BUSCO against the most specific lineage dataset available and report all four categories, not just “percent complete.”
- Run a reference-based (QUAST-style) or read-mapping-based accuracy check before treating a high-N50 assembly as a finished product.
- Be skeptical of an N50 improvement that isn’t accompanied by an unchanged or improved BUSCO/accuracy result — that pattern is consistent with parameter tuning that traded correctness for a longer headline number.
Frequently Asked Questions
Is N50 the same as the median contig length?
No. N50 is length-weighted — it identifies the contig length at which half the total assembled sequence is contained in contigs that long or longer. The median contig length instead finds the middle value in a list of contigs ranked by count, giving no extra weight to how much sequence each contig contributes. The two numbers can be close by coincidence in an evenly-sized assembly, but they measure different things and diverge substantially in a typical real assembly with many short fragments alongside a few long contigs.
What’s a “good” N50?
There is no universal threshold — a good N50 is relative to the organism’s genome size, ploidy, and repeat content, and to what the assembly is being used for. A few-kilobase N50 can be entirely adequate for a compact, low-repeat bacterial genome; the same figure would be a poor result for a large, repeat-rich eukaryotic genome where chromosome-scale contigs are the realistic bar. Compare N50 against genome size (via NG50) and against comparable published assemblies of related organisms, not against a fixed number.
Why does scaffold N50 sometimes look much better than contig N50?
Scaffolding joins contigs across gaps using auxiliary evidence — long-range read pairs, long-read spanning, optical maps, or Hi-C proximity data — and represents those gaps with placeholder N’s rather than real sequence. That inflates scaffold N50 without adding any new confirmed sequence, so a large gap between contig N50 and scaffold N50 usually means a lot of the assembly’s apparent length comes from bridged, not directly sequenced, gaps. Reporting both numbers, not just the more flattering one, is the honest way to represent that.
Can N50 alone tell me if my assembly has misassemblies?
No. N50 is computed purely from contig/scaffold length; it has no way to evaluate whether a contig’s internal sequence is correctly ordered and oriented. A misjoined, chimeric contig is, if anything, more likely to raise N50 than a correctly-terminated one, since it is by definition longer. Detecting misassembly requires a reference-based alignment check or a read-mapping-based coverage/discordance check — see the accuracy section above.
Do I need both BUSCO and a reference-based check, or is one enough?
They catch different failure modes and neither substitutes for the other. BUSCO evaluates gene-content completeness and can flag duplication/contamination issues but says nothing about structural correctness of non-genic regions or contig-level misjoins. A reference-based or read-mapping check evaluates structural accuracy but doesn’t directly assess whether expected gene content is present. Assembly-QC methodology treats contiguity (N50/NG50), completeness (BUSCO), and accuracy (reference/read-mapping-based) as three separate axes that all need reporting.








