Understanding FASTQ Format, Phred Quality Scores and N50
6 min read ยท Updated June 8, 2026
FASTQ is the format almost all sequencing data arrives in, and it carries a quality score for every single base. If you've ever been confused by the wall of symbols on the fourth line, or by what N50 actually means, this guide is for you.
The four lines of a FASTQ record
- A header line starting with '@' that names the read.
- The sequence of bases.
- A separator line starting with '+' (optionally repeating the header).
- A quality line with one character per base, encoding the Phred score.
Phred quality scores
A Phred quality score Q expresses the probability that a base call is wrong: Q = โ10 ร log10(P_error). So Q20 means a 1-in-100 chance of error (99% accuracy), Q30 means 1-in-1000 (99.9%), and Q40 means 1-in-10,000. Q30 is a common quality threshold for trusting a base.
How the quality line is encoded
Each Phred score is stored as a single ASCII character by adding an offset. Modern data uses Phred+33 (Sanger / Illumina 1.8+), where a score of 0 is the character '!'. Older Illumina data (1.3โ1.7) used Phred+64. Picking the wrong encoding shifts every score by 31, so it matters to choose correctly when summarising quality.
What N50 tells you
N50 summarises a length distribution โ typically of contigs in an assembly or of reads. It is the length L such that half of all bases sit in sequences of length L or longer. A higher N50 generally means a more contiguous assembly, though it should always be read alongside total size and the number of sequences.
Frequently asked questions
- What does a Phred score of 30 mean?
- Q30 corresponds to a 1-in-1000 probability that the base call is incorrect โ 99.9% accuracy. It is a widely used threshold for high-quality bases.
- How do I know if my FASTQ uses Phred+33 or Phred+64?
- Almost all current data is Phred+33. Phred+64 was used by older Illumina pipelines (1.3โ1.7). If quality characters include '!' through ':' the data is Phred+33; choosing the wrong offset shifts every score by 31.