RNA-seq Normalization: CPM, TPM, FPKM

Raw counts are not comparable across genes or samples. Learn what CPM, FPKM, and TPM each correct for, the trap of comparing TPM between samples, and the one rule that keeps DESeq2 happy.

🟢 Beginner ⏱️ ~30 min 🧠 Concepts + R

Before you start

Learning objectives

By the end of this lesson you will be able to: explain why raw counts cannot be compared directly, say what CPM, FPKM, and TPM each correct for, explain why TPM is a within-sample unit that can mislead when you compare samples, choose the right values for comparing samples, and state the rule that DESeq2 and edgeR must receive raw integer counts, not normalized values.

Why raw counts are not comparable

A raw count is simply the number of reads that mapped to a gene. Two things make raw counts unfair to compare. First, library size (sequencing depth): if sample A was sequenced twice as deeply as sample B, every gene in A will tend to show roughly twice the counts, even when nothing biological changed. Second, gene length: a long gene is a bigger target, so it collects more reads than a short gene at the same true expression level. Because of these two effects, you cannot read a count of 800 in one place and 400 in another and conclude that the first is twice as active.

Two confoundersDepth and length

Depth (library size) makes whole samples scale up or down together. Gene length makes long genes look more expressed than short ones within a sample. Each normalization method removes one or both of these.

1What each method corrects for

CPM (counts per million) divides each count by the library size and multiplies by a million. It corrects for depth only, so it still treats a long gene as if it were more expressed than a short one. RPKM and FPKM (the F is for fragments, used with paired-end reads) correct for depth and gene length. TPM (transcripts per million) also corrects for both, but in an order that gives it a tidy property: within every sample, all TPM values add up to the same total (one million). So a TPM value is simply a gene's share of that sample's transcripts. That makes TPM easier to read than FPKM inside one sample.

What gets corrected CPM depth: yes length: no quick checks and filtering low counts FPKM depth: yes length: yes older unit; totals differ by sample TPM depth: yes length: yes a share of 1,000,000: genes within a sample To compare samples or test for differences: DESeq2 / edgeR normalized counts.
CPM fixes depth; FPKM and TPM fix depth and length. All three describe one sample well. None of them is the right tool for comparing samples.
MethodCorrects depth?Corrects gene length?Best used for
CPMYesNoQuick checks and filtering out genes with very low counts
FPKM / RPKMYesYesOlder reports; comparing genes within one sample. TPM has replaced it
TPMYesYesComparing genes within one sample; reporting expression levels. Not reliable across samples whose RNA mix differs
DESeq2 median-of-ratios (or edgeR TMM)Yes, and also corrects for differences in RNA mixNo (the same gene is compared, so length cancels out)Comparing the same gene across samples, and differential expression. Computed from raw counts

2The TPM trap: comparing samples

Because TPM is a share, it is tempting to think a gene's TPM in sample A and sample B can be compared directly. Researchers do this often, and a 2020 review in the journal RNA calls it a common misconception. The problem is that a share depends on everything else in the sample.

Imagine one gene, like hemoglobin (HBB) in a blood sample, suddenly makes up most of the RNA in sample B. TPM must still add up to one million. So every other gene's share shrinks, even though nothing happened to those genes. Their TPM drops, and it looks like they went down.

Same other genes, smaller share Sample A HBB 33% all other genes 67% Sample B HBB 83% (truly went up) 17% The other genes did not change, but their TPM fell to a quarter.
TPM is a share of a fixed total, so when one gene grows, every other gene's TPM shrinks.

The same thing happens when samples differ in how much ribosomal or mitochondrial RNA they contain, when they come from different tissues, or when they were prepared with different library protocols (for example poly(A) selection vs rRNA depletion). In all these cases the RNA mix (also called composition) differs, and TPM values stop being comparable.

DESeq2's median-of-ratios and edgeR's TMM were built for this. They assume that most genes do not change between samples, and they scale each sample using those stable genes. One very abundant gene cannot drag everything else down. In a study of tumor replicates, these normalized counts kept replicates of the same tumor together far better than TPM or FPKM did.

Try it yourself. The code below builds the hemoglobin example and compares TPM with DESeq2-style normalized counts. Press Run, then change the numbers and run it again.

Rule of thumb

Comparing genes within one sample? TPM is fine. Comparing the same gene across samples? Use DESeq2 or edgeR normalized counts. If you are handed only TPM from a database, compare samples only when they used the same protocol and have a similar RNA mix, and treat the result as a rough guide.

3The rule that keeps DESeq2 happy

This is the part beginners get wrong most often. For differential expression, DESeq2 and edgeR do their own normalization internally, the median-of-ratios method in DESeq2 and TMM in edgeR, and they must be given raw integer counts. Never feed them CPM, FPKM, or TPM. Those values are already scaled and are no longer counts, and the statistical model that DESeq2 uses assumes count data with a specific mean to variance relationship. Hand DESeq2 the raw count matrix and let it normalize for you.

One-line summary

CPM corrects depth; FPKM and TPM correct depth and length and describe genes within one sample. To compare samples, use DESeq2 or edgeR normalized counts. For differential expression, give DESeq2 or edgeR raw counts and let them normalize internally.

A worked example in R

CPM is the simplest formula. For gene g in a sample, CPM = (count for g / total mapped reads in that sample) × 1,000,000. TPM first divides each count by gene length, then scales so the sample adds up to one million. The example below calculates both by hand, then gives the raw counts to DESeq2 and prints its normalized counts. Look at GENE2 to GENE6: their TPM drops in the treated samples, but their DESeq2 normalized counts stay flat. This code was tested with R 4.3 and DESeq2 1.42.

# A tiny RAW count matrix: 6 genes x 4 samples (2 control, 2 treated)
counts <- matrix(c(
  500,  520, 1300, 1250,   # HBB: really goes up in treated
  200,  210,   60,   55,   # GENE2 to GENE6: unchanged biologically,
  300,  290,   80,   85,   #   but squeezed in treated samples because
  400,  410,  110,  100,   #   HBB takes most of the reads
  100,   95,   25,   30,
  250,  260,   70,   65),
  nrow = 6, byrow = TRUE,
  dimnames = list(c("HBB", "GENE2", "GENE3", "GENE4", "GENE5", "GENE6"),
                  c("ctrl1", "ctrl2", "trt1", "trt2")))
storage.mode(counts) <- "integer"          # raw counts are whole numbers
gene_length_kb <- c(0.6, 2.0, 1.5, 3.0, 1.0, 2.5)

# --- CPM: corrects depth only ---
cpm <- t(t(counts) / colSums(counts)) * 1e6
round(cpm)

# --- TPM: corrects length first, then depth; each sample sums to 1e6 ---
rpk <- counts / gene_length_kb             # reads per kilobase
tpm <- t(t(rpk) / colSums(rpk)) * 1e6
round(tpm)
colSums(tpm)                               # 1e6 in every sample

# --- DESeq2: give it the RAW counts, it normalizes internally ---
library(DESeq2)
sample_info <- data.frame(condition = factor(c("control", "control",
                                                "treated", "treated")),
                          row.names = colnames(counts))
dds <- DESeqDataSetFromMatrix(countData = counts,
                              colData   = sample_info,
                              design    = ~ condition)
dds <- estimateSizeFactors(dds)            # median-of-ratios
sizeFactors(dds)
round(counts(dds, normalized = TRUE))      # use THESE to compare samples

In the output, GENE2's TPM falls from about 68,000 in the controls to about 12,500 in the treated samples, while its DESeq2 normalized count stays between 104 and 112 in all four. Only HBB truly changed, and only the normalized counts show that.

Check your understanding

Why can you not compare raw counts directly between two genes in the same sample?
Right. Within a sample, every gene shares the same sequencing depth, so depth is not the issue there. A longer gene is a bigger target and collects more reads at the same true expression, so length must be corrected before comparing genes.
What does CPM correct for?
Correct. CPM divides by library size, so it removes depth differences, but it does not adjust for gene length. TPM and FPKM correct both.
In sample B, one gene suddenly makes up most of the RNA. The other genes did not change. What happens to the other genes' TPM in sample B?
Exactly. TPM always adds up to one million per sample. When one gene takes a bigger share, every other gene's share shrinks, so their TPM falls even though they did not change. Correcting depth does not fix this.
You are about to run DESeq2 for differential expression. What should you give it?
Right. DESeq2 uses median-of-ratios on raw counts, and its statistical model needs count data. Passing it TPM, FPKM, or CPM breaks that model and gives invalid results.
You want to see whether gene X differs between treated and control samples (no formal test yet, just a first look). Which values should you plot?
Correct. Comparing the same gene across samples is exactly what median-of-ratios and TMM normalization are for. TPM and FPKM can shift when the RNA mix differs between samples, and gene length does not matter when you compare one gene with itself.

Sources & further reading

  1. Zhao S, Ye Z, Stanton R. Misuse of RPKM or TPM normalization when comparing across samples and sequencing protocols. RNA 26(8): 903-909, 2020. doi:10.1261/rna.074922.120
  2. Zhao Y, Li M-C, Konaté MM, et al. TPM, FPKM, or normalized counts? A comparative study of quantification measures for the analysis of RNA-seq data from the NCI Patient-Derived Models Repository. Journal of Translational Medicine 19: 269, 2021. doi:10.1186/s12967-021-02936-w
  3. Wagner GP, Kin K, Lynch VJ. Measurement of mRNA abundance using RNA-seq data: RPKM measure is inconsistent among samples. Theory in Biosciences 131: 281-285, 2012. (Where TPM was proposed.) doi:10.1007/s12064-012-0162-3
  4. Love MI, Huber W, Anders S. Moderated estimation of fold change and dispersion for RNA-seq data with DESeq2. Genome Biology 15: 550, 2014. doi:10.1186/s13059-014-0550-8
  5. Robinson MD, Oshlack A. A scaling normalization method for differential expression analysis of RNA-seq data. Genome Biology 11: R25, 2010. (The TMM method used by edgeR.) doi:10.1186/gb-2010-11-3-r25

Last reviewed: October 2026.

Now analyze a full dataset

Your First RNA-seq Analysis →