Log2 Fold Change Calculator & Offset Sensitivity
Paste corresponding baseline and comparison values. Review each fold change, compare the paired geometric estimate with the ratio of totals, and explore how the two estimates respond to an explicitly chosen offset.
Compare log₂ fold change across matched pairs
Find how the ratio of totals compares with typical paired changes, and what changes when you add an offset.
Edit paired measurements and offsets
Paste baseline and comparison values in one common unit. Add an optional label as the first column.
Paired geometric fold change
1.70997595×
Log₂ 0.773976032
Averages the log₂ change across pairs. Each pair has equal weight.
Pooled fold change
0.637168142×
Log₂ -0.650253961
Divides the comparison total by the baseline total at the entered offset.
Log₂ change by pair
A log₂ change of +1 doubles the baseline. A change of −1 halves it. Pairs follow the order of your rows.
Review matched pairs and export CSV
| Pair | Baseline | Comparison | Fold change | Log₂ |
|---|---|---|---|---|
| Station A | 1 | 10 | 10× | 3.32192809 |
| Station B | 100 | 50 | 0.5× | -1 |
| Station C | 12 | 12 | 1× | 0 |
CSV includes exact input fractions and ratios plus rounded logarithms at the sampled offsets.
How to use this calculator
- Paste baseline and comparison for each matched pair. You can include a unique label in the first column.
- Read the paired geometric fold change, the pooled fold change, and the individual effects. A zero offset preserves the raw ratios.
- Set a positive sensitivity limit and, if desired, an additive offset in the same units as the measurements. Switch to Offset sensitivity to see how both estimates move.
- Open the ledger and export the exact ratios, per-pair zero states, and evaluated offset scenarios as CSV.
The Formula
The mathematical logic powering this calculation is:
For baseline B, comparison C, and user-entered additive offset a, fold change = (C + a)/(B + a). Its log₂ is positive for an increase, zero for equal positive adjusted values, and negative for a decrease. With a = 0, B = 0 and C > 0 has an unbounded positive log₂ change. B > 0 and C = 0 gives fold change zero and log₂ = −∞. Two zero values give an undefined ratio.
The paired geometric estimate is 2 raised to the mean of the per-pair log₂ values. Each pair receives equal weight. The mean is available when all pairs have a finite log₂ result. The pooled estimate divides Σ(C + a) by Σ(B + a). Larger adjusted baselines contribute more to the pooled ratio when each baseline is positive. The two estimates can report different directions.
A positive additive offset is applied to every baseline and comparison before calculating either estimate. For counts, this offset is often called a pseudocount. Larger offsets pull individual finite ratios toward one. The sensitivity view evaluates 25 evenly spaced offsets from zero to the chosen limit, plus the exact selected offset. It plots finite log₂ values and leaves gaps where a summary is undefined or infinite.
Enter 1–36 pairs of nonnegative values up to 1 billion, with up to six decimals in a common unit. The selected additive offset spans zero through the positive sensitivity limit. Ratios and the product behind the geometric estimate use exact decimal-derived fractions. Logarithms and the plotted values are approximate. This worksheet summarizes supplied measurements and the stated offset scenarios.Worked Example
If you input:
- Paired readings: 1 to 10, 100 to 50, and 12 to 12
- Additive offset: 0
- Sensitivity limit: 10
Result:
The paired geometric estimate increases with log₂ change about 0.773976032. The pooled ratio is 72/113, with log₂ change about −0.650253961. The larger comparison decrease contributes more to the ratio of totals.
Frequently Asked Questions
How do you calculate log2 fold change?
Divide the comparison by the baseline, then take the base-2 logarithm. A twofold increase gives +1 and a halving gives −1.
Why do paired and pooled fold changes differ?
The paired geometric estimate gives each log ratio the same weight. The pooled ratio combines the amounts first, so higher baseline amounts can contribute more to its direction.
What does a zero baseline mean for fold change?
A positive comparison over a zero baseline is unbounded. Two zeros give an undefined ratio. The worksheet keeps these states visible in the per-pair results.
What happens when I add a pseudocount?
Adding the chosen offset to both values makes zero entries positive. Larger offsets tend to bring ratios toward one, so the chart helps you assess how the choice changes the summary.
Can a ratio of totals be finite when the paired estimate is undefined?
Yes. The ratio of totals is finite when each sum is positive. Individual pairs may still have zero values and produce non-finite log ratios.
Similar Calculators
Logarithm Properties Calculator
Expand and condense logarithms using product, quotient and power rules. Compare exact real domains and check a point in both forms.
Exponential Growth & Decay Calculator
Project exponential growth or decay from a rate or two observations. Find doubling time, half-life and when the curve reaches a target.
T-Test Calculator
Compare a mean, matched pairs or two independent groups with Welch or pooled t-tests. Explore confidence intervals, data and tail plots, exact summaries and CSV.
