How to Calculate Log2 Fold Change (and What a Log2FC of 4 Means)
Log2 fold change is the base-2 logarithm of a ratio between two measurements of the same quantity: log2FC = log2(B / A), where B is the condition of interest and A is the reference. Equivalently, if you already have logged values, log2FC = log2(B) - log2(A). A log2FC of 4 means B is 2⁴ = 16 times A. A log2FC of -4 means B is 1/16 of A, a 16-fold decrease. That is the whole calculation. Everything that follows is about getting A and B right, because the arithmetic is never the part that goes wrong.
The formula and the conversions worth memorizing
Going from log2 fold change to linear fold change is FC = 2^log2FC. Going the other way is log2FC = log2(FC). If your numbers arrived in a different base, convert first: log2(x) = ln(x) / ln(2) = ln(x) / 0.6931, and log2(x) = log10(x) × 3.3219.
| log2FC | Linear fold change | Plain reading |
|---|---|---|
| 0 | 1.00 | no change |
| 0.26 | 1.20 | 20% increase |
| 0.58 | 1.50 | 50% increase |
| 1 | 2.00 | doubled |
| 1.58 | 3.00 | tripled |
| 2 | 4.00 | 4× |
| 3 | 8.00 | 8× |
| 4 | 16.0 | 16× |
| 5 | 32.0 | 32× |
| -1 | 0.50 | halved |
| -2 | 0.25 | quarter |
| -4 | 0.0625 | 1/16 |
Two traps show up repeatedly in forum answers. The first is applying 2^x to a value that is already linear. The second is negating before exponentiating, as in 2^-log2FC, which inverts the direction of the effect. If a gene goes up and your pipeline reports it going down, check that step first.
Why the log, and why base 2
Raw ratios are asymmetric around the null. A doubling is 2.0 and a halving is 0.5, so an increase can range to infinity while a decrease is bounded by zero. That asymmetry breaks any statistic that assumes a symmetric error distribution, and it makes heatmaps and volcano plots misleading. Taking the log makes a doubling (+1) and a halving (-1) equal in magnitude and opposite in sign.
Base 2 is a convention chosen for readability rather than mathematics. Each unit is one doubling, which is the natural granularity of expression and abundance data. Base e would work identically for the statistics and is what several model fits use internally, but few people can read ln values at a glance.
Computing it correctly from counts
For RNA sequencing, the input to the ratio must be normalized counts. Raw counts will not do. A sample with 40 million reads will show higher counts than a sample with 20 million for nearly every gene, and that library-size difference is not biology. In practice we let a differential expression package do the normalization and the fold change together, because the two steps share assumptions.
The approach we would use for bulk RNA-seq is DESeq2 with shrunken effect sizes:
library(DESeq2)
dds <- DESeqDataSetFromMatrix(counts, colData = meta, design = ~ condition)
dds <- DESeq(dds)
res <- lfcShrink(dds, coef = "condition_treated_vs_control", type = "apeglm")
The lfcShrink call matters more than people expect. An unshrunken log2FC for a gene with 4 counts in one group and 1 in the other is 2.0, which looks like a strong effect and is almost entirely noise. apeglm pulls low-information estimates toward zero while leaving well-measured genes nearly untouched, so the ranked list stops being dominated by low-expression noise. The tradeoff is that the reported log2FC is no longer the plain ratio of normalized means, and you should say so when you report it.
If you want a threshold test rather than a threshold filter, ask for it in the model instead of filtering afterward:
res <- results(dds, lfcThreshold = 1, altHypothesis = "greaterAbs")
This tests the null that |log2FC| ≤ 1 and gives p-values calibrated to that question. Filtering a standard result table on abs(log2FoldChange) > 1 does not, because the fold change and the p-value are then being used twice.
For a quick manual check, the calculation in Python is unremarkable:
import numpy as np
log2fc = np.log2(treated_mean + 1) - np.log2(control_mean + 1)
The + 1 pseudocount prevents division by zero and infinite values. It also biases every low-abundance gene toward zero change, and the size of the bias depends on the pseudocount you picked. Use it for sanity checks and plots. Do not use it for a results table.
Where the naive calculator fails
Zeros are the first failure mode. log2(0) is negative infinity and log2(x/0) is undefined. Any real pipeline must therefore add a pseudocount, impute, or drop the feature. In proteomics this is unavoidable, because mass-spectrometry data are missing in a way that depends on abundance: low-abundance proteins fall below the detection limit and simply do not appear. Guidance for proteomics fold change and significance calculation covers how imputation choices propagate into the reported ratios, and treating a missing value as zero will manufacture large fold changes that do not exist.1
The second failure mode is fold change without variance. A log2FC of 4 computed from one sample per group carries no information about reproducibility. Differential expression workflows pair the effect size with a test statistic precisely so that large ratios from noisy features can be set aside.2 Multi-omics analyses that report log2FC across transcripts and proteins together lean on this pairing, since the noise structure differs sharply between the two layers.3
The third is comparing fold changes computed on different scales. Microarray and normalized proteomics intensities are often already log-transformed, so you subtract rather than divide. Counts are linear, so you divide. Mixing the two silently produces numbers that look plausible and mean nothing.
What a log2FC of 4 tells you
A 16-fold change is large. In bulk tissue RNA-seq of a stable system, values above 3 usually come from one of three places. The first is a genuinely switch-like gene such as an interferon-stimulated transcript. The second is a low-count feature that shrinkage would have tamed. The third is a technical artifact such as a sample swap or contamination. Check the normalized counts directly before interpreting.
Effects of that size do occur under strong perturbation. Panels of cancer cell lines exposed to drugs show wide distributions of fold change across the transcriptome, with a tail of very large responses.4 Sustained stress responses produce similar magnitudes in coordinated gene sets.3 Time-course designs complicate the reading further, because a single log2FC collapses a trajectory into one number and can hide a transient peak entirely.5
For personal longitudinal data, our view is that fold change is a screening tool rather than a conclusion. Compute it, rank by it, then look at the underlying values and the biological grouping of the hits. Network and pathway methods exist because individual large fold changes are less informative than a consistent shift across a related set of genes or proteins.6 Nothing here supports a clinical read on your own data. If a result looks medically meaningful, take it to a physician.
Questions people also ask
What is a log2 fold change of 4? A 16-fold increase, since 2⁴ = 16. A log2FC of -4 is a 16-fold decrease, or 6.25% of the reference value.
How do I convert log2 fold change back to fold change? Raise 2 to that power: 2^log2FC. Do not negate the exponent first. For negative log2FC values the result is a fraction below 1, which is the correct representation of a decrease.
Is a log2FC of 1 a 100% increase? Yes. A log2FC of 1 is a doubling, which is a 100% increase over baseline. A log2FC of 0.58 is a 50% increase.
Why do my hand-calculated fold changes differ from DESeq2 output? Because lfcShrink reports a shrunken estimate rather than the ratio of normalized group means. DESeq2 also uses median-of-ratios normalization and fits a generalized linear model, so the group summaries differ from simple averages.
What log2FC cutoff should I use? There is no universal value. A threshold of 1 is conventional for RNA-seq and 0.58 is common in proteomics where dynamic range is narrower.1 Set the threshold inside the test with lfcThreshold rather than filtering the output.
Footnotes
-
Jennifer T Aguilan, Katarzyna Kulej, Simone Sidoli. Guide for protein fold change and p -value calculation for non-experts in proteomics. Molecular Omics, 2020. https://doi.org/10.1039/d0mo00087f ↩ ↩2
-
Naiyar Iqbal, Pradeep Kumar. Integrated COVID-19 Predictor: Differential expression analysis to reveal potential biomarkers and prediction of coronavirus using RNA-Seq profile data. Computers in Biology and Medicine, 2022. https://doi.org/10.1016/j.compbiomed.2022.105684 ↩
-
Stefan Reich, Chi D. L. Nguyen, Canan Has, et al. A multi-omics analysis reveals the unfolded protein response regulon and stress-induced resistance to folate-based antimetabolites. Nature Communications, 2020. https://doi.org/10.1038/s41467-020-16747-y ↩ ↩2
-
Ayako Suzuki, Keiichi Onodera, Ken Matsui, et al. Characterization of cancer omics and drug perturbations in panels of lung cancer cells. Scientific Reports, 2019. https://doi.org/10.1038/s41598-019-55692-9 ↩
-
Massimo Bionaz, Kathiravan Periasamy, Sandra L. Rodriguez-Zas, et al. A Novel Dynamic Impact Approach (DIA) for Functional Analysis of Time-Course Omics Studies: Validation Using the Bovine Mammary Transcriptome. PLoS ONE, 2012. https://doi.org/10.1371/journal.pone.0032455 ↩
-
Konstantina Charmpi, Manopriya Chokkalingam, Ronja Johnen, et al. Optimizing network propagation for multi-omics data integration. PLOS Computational Biology, 2021. https://doi.org/10.1371/journal.pcbi.1009161 ↩
Pothos builds longitudinal molecular profiles of individuals: whole-genome sequencing, single-cell RNA sequencing, and plasma proteomics, delivered as a detailed report, every data file, and stored cells. Build your profile.