Tutorials

Counts, TPM, FPKM: which one when

What counts, CPM, RPKM, FPKM and TPM each measure, when to use them, and why TPM and FPKM can disagree for the same gene.

Every RNA-seq analysis produces more than one kind of expression value, and the units are easy to mix up. Counts, CPM, RPKM, FPKM and TPM each correct for something different, and using the wrong one can change a conclusion or make two samples look comparable when they are not. This article explains what each unit is, what question it answers, and where each one fails.

Start with raw counts

A count is the number of reads, or fragments, that a quantification tool assigned to a gene or transcript. It is the closest thing to the measurement itself.

A count depends on three things: how strongly the gene was expressed, how long the gene or transcript is, and how deeply the sample was sequenced. Two samples can have the same biology and different counts simply because one library produced twice as many reads. That is why counts alone are not comparable between samples, and why every other unit in this article is a correction of counts.

Counts also have a statistical property that matters. Their variance grows with their mean, roughly in a negative-binomial way, and the tests used for differential expression are built on that relationship. This is why those tools want counts rather than a transformed value.

Correcting for depth: CPM

Counts per million divides each count by the total number of reads in the sample and multiplies by one million. It removes the effect of sequencing depth, so a gene with 100 CPM in one sample and 100 CPM in another has the same share of the library.

CPM still ignores gene length. A long gene collects more reads than a short gene expressed at the same level, so CPM is fine for comparing the same feature across samples but misleading when comparing different features within a sample. CPM is common in single-cell work and in quick quality checks, and it is a reasonable unit for describing library composition.

Correcting for length: RPKM and FPKM

RPKM, reads per kilobase per million, divides the count by gene length in kilobases and by the library size in millions. FPKM is the same idea for paired-end data, where a fragment produces two reads. The numbers are usually close and the distinction matters mainly for historical accuracy.

Both try to make a value reflect expression level rather than gene length, and both have a known defect. The normalisation factor is the total number of reads, which includes the most highly expressed genes. If a handful of genes take up half the library in one sample, every other gene's RPKM is pushed down, even though its absolute expression has not changed. RPKM and FPKM are therefore not consistent between samples whose composition differs, which is exactly the situation in most comparisons of interest.

TPM: length first, then depth

Transcripts per million fixes the order of operations. Divide counts by transcript length first, then scale those length-normalised values so they sum to one million.

The consequence is that TPM values sum to the same number in every sample. That makes them comparable as shares of the transcript pool, and it removes the composition problem that affects RPKM. If a gene is 200 TPM in a control and 200 TPM in a treated sample, its share of the transcriptome is the same in both.

TPM is not a count, and its values are not integers. That is fine for description and plotting, and unsuitable for count-based tests.

Why the units disagree

The difference between FPKM and TPM is not cosmetic. A gene can rise in FPKM while falling in TPM if the rest of the transcriptome rose faster. Neither number is wrong; they answer different questions. FPKM is closer to reads per length unit relative to total reads, while TPM is a share of the length-normalised pool. When two papers report different units and different directions for the same gene, this is often why.

There is also a version problem. Gene length depends on the annotation release and on whether you count the union of all transcripts or a single canonical transcript. Two analyses using different GTF files can report different TPM for the same gene and the same reads. Record the annotation version.

Which unit for which job

JobUnitReason
Differential expression with DESeq2 or edgeRRaw countsThe models estimate mean-variance relationships and normalise internally
Comparing one gene across samplesTPMCorrected for length and depth, with a stable total
Describing the share of a sampleTPM or CPMBoth are proportional within a sample
Heatmaps and clusteringTPM, or a variance-stabilised countRaw counts are dominated by highly expressed genes
Machine learning on expressionTPM or log-transformed TPMValues are on a comparable scale across samples
Transcript-level questionsTranscript TPM, imported with tximportGene-level sums hide isoform switches

The RNA-seq workflow shows where quantification and normalisation sit in the wider analysis, and the comparison of DESeq2, edgeR and limma-voom explains why those tools normalise counts themselves rather than accepting TPM.

The mistakes that follow

Giving TPM or FPKM to DESeq2. The tool expects counts and models their variance. TPM values are continuous, lack the mean-variance relationship the model assumes, and DESeq2 will warn or produce nonsense. Convert to counts or start again from the count matrix.

Averaging FPKM across replicates. Averaging normalised values before testing hides the within-group variability that the test needs. Test on counts, then summarise the significant genes in TPM for the figure.

Comparing TPM between studies. TPM removes depth and length effects, not batch, protocol or RNA-quality effects. A TPM of 50 in a ribo-depleted library and a TPM of 50 in a poly-A library are not the same measurement.

Summing FPKM. Because the total varies with composition, sums of FPKM across genes are not meaningful. TPM sums to one million by construction, which makes it safe for statements about composition.

Quoting TPM to two decimal places. Quantification uncertainty at low counts is large. Two significant figures are usually enough, and none at all for a gene with a handful of reads.

A practical rule

Use raw counts for every statistical test, TPM for describing and plotting expression, and state the unit, the annotation and the quantification tool in the figure legend. If a reviewer asks why a gene moves in one unit and not another, the explanation above is usually the answer.

If a count matrix has already been converted to TPM and the original counts are lost, the analysis can sometimes be recovered from the BAM files or from the quantification output, but it is worth checking before the project goes further. The quality-control checklist covers the checks that come before any of this.

Key points

  • Counts depend on expression, gene length and sequencing depth; they are the input for statistical testing.
  • CPM corrects for depth only and is well suited to comparing the same feature across samples.
  • RPKM and FPKM correct for length and depth but are not consistent when sample composition differs.
  • TPM normalises length first, so values sum to one million and are comparable as shares.
  • FPKM and TPM can move in opposite directions for the same gene; this is a definition, not an error.
  • Use raw counts for DESeq2, edgeR and limma-voom; use TPM for description, plots and machine learning.
  • Record the annotation release and quantification tool, because both change the numbers.

When to ask for help

If you are unsure which matrix to hand to a differential-expression tool, or if two units tell conflicting stories for the same gene, an analyst can trace the values back to the counts and the annotation and explain the discrepancy. You can order an analysis or discuss a project through our RNA-seq analysis service. The guide to multiple testing and FDR covers the next decision, turning a table of values into a defensible list of significant genes.

Sources

When to ask for help. If your data or design do not fit a tutorial, order an analysis and we will reply with a fixed price.

Written by the Solagene team for research and education. Found an error? Tell us and we will correct it.