This calculator converts a concentration from one base to another — specifically, it converts a value expressed in counts per million (CpM) to a value in base B (CpB), where base B is the total number of reads or counts in your sample. You enter the count for your feature (gene, peak, etc.) and the total count for the sample, and you get the CpB value, which is the count per million of that feature.
Formula
The formula for CpB conversion is straightforward:
CpB = (Count for feature / Total counts in sample) × 1,000,000
Where:
- Count for feature (c) – the number of reads, counts, or observations assigned to the feature of interest (unit: counts).
- Total counts in sample (t) – the total number of reads or counts in the entire sample (unit: counts).
- CpB – the normalized count per million (unit: counts per million, CpM).
Worked Example
Using the default values from the calculator:
Count for feature = 2,500 counts, Total counts = 10,000,000 counts.
- Divide the feature count by the total count: 2,500 / 10,000,000 = 0.00025
- Multiply by 1,000,000: 0.00025 × 1,000,000 = 250
The result is 250 CpB (or 250 counts per million).
Assumptions
- The total counts represent the entire sequenced or counted set for the sample.
- All counts are from the same sample and same assay.
- No normalization for transcript length or GC content is applied (this is a simple count normalization).
When to Use CpB Conversion
CpB (counts per million) is a standard normalization method in high-throughput sequencing, particularly RNA-seq and ChIP-seq. It allows you to compare feature counts across samples with different sequencing depths. If one sample has 20 million reads and another has 40 million, a raw count of 2,000 in the first is not directly comparable to 2,000 in the second. CpB scales both to a common denominator (per million reads), making them comparable.
This conversion is also used in other counting contexts, such as metagenomics, where you might normalize operational taxonomic unit (OTU) counts, or in any field where you have a count of items within a larger set and want to express it per million.
How to Read the Result
The result tells you how many counts of your feature you would expect if the sample had exactly one million total counts. A higher CpB means the feature is more abundant relative to the sample. For example, a gene with 250 CpB is more abundant than a gene with 100 CpB in the same sample.
When comparing samples, you can directly compare CpB values. A gene with 250 CpB in sample A and 200 CpB in sample B is more abundant in sample A, assuming the same total counts and similar conditions.
Common Mistakes and How to Avoid Them
- Using raw counts without normalization – Always normalize before comparing across samples with different depths.
- Using the wrong total – Ensure the total counts include all reads in the sample, not just mapped reads or reads passing a filter, unless you intend to use a subset (e.g., only uniquely mapped reads).
- Forgetting the multiplication by 1,000,000 – The formula is count/total × 1e6, not just count/total.
- Rounding too early – Keep at least 4 significant figures in intermediate steps to avoid rounding errors.
Limitations of CpB
CpB is a simple normalization that assumes each read is equally likely to come from any part of the transcriptome. It does not account for:
- Transcript length – Longer transcripts generate more reads, so CpB overestimates expression for long genes. For gene expression, use RPKM/FPKM/TPM if you need length normalization.
- Compositional bias – If a few highly expressed genes dominate a sample, they reduce the CpB of all other genes. Methods like TMM or DESeq2’s median-of-ratios can correct for this.
- GC bias or technical variation – CpB does not correct for systematic biases in library preparation.
For many exploratory analyses, CpB is a quick and acceptable normalization. For differential expression, use dedicated tools that model count distributions.
Frequently Asked Questions
What is the difference between CpB and RPKM?
CpB normalizes only by sequencing depth (total reads). RPKM (Reads Per Kilobase per Million) also divides by transcript length (in kilobases). RPKM is better for comparing expression between genes of different lengths within a sample, while CpB is simpler and often used for peaks or other features without length.
Can I use CpB for ChIP-seq data?
Yes, CpB is commonly used for ChIP-seq to normalize peak counts. However, many ChIP-seq analyses use a different metric called ‘reads per million’ (RPM) which is the same as CpB. For differential binding, consider using a tool like DiffBind or MAnorm that accounts for background.
What if my total counts are very high, like 50 million?
The calculator handles any positive total. For 50 million, a feature with 5,000 counts would be 5,000 / 50,000,000 × 1,000,000 = 100 CpB. The calculator accepts large numbers, but ensure you enter the counts as integers (whole numbers) for accuracy.
Is CpB the same as CPM?
Yes, CpB stands for counts per base (or per billion? Actually, in this context, it’s counts per million). In genomics, CPM (counts per million) is the same calculation. The term ‘base’ in ‘CpB’ might refer to ‘base count’ or ‘base unit’, but the math is identical. Always check the context in your field.
Do I need to log-transform CpB values?
Often, yes. CpB values are skewed with many small values and a few large ones. Log2 transformation (log2(CpB + 1)) is common to make the distribution more normal and to stabilize variance for statistical tests. The calculator gives raw CpB; you can transform it yourself.
Can I use this for single-cell RNA-seq?
Yes, but single-cell data often has very low counts and high dropout. CpB is used, but more sophisticated methods like normalization by total counts per cell (library size) and scaling to a median are common. Tools like Seurat use log-normalization, which is similar but adds a scale factor. This calculator gives the basic CpB, which is a good starting point.
Related
Formula used
in c | Count for feature | counts | 2500 | 0 in t | Total counts in sample | counts | 10000000 | 1 out cpb | CpB (counts per million) | CpM | c / t * 1000000 | 2
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation with the constants and conversion factors written on the page, rounded as each result states. See method and constants, the disclaimer or report an error.
More in this section
- Normality to g/L Converter & Formula29.220 g/L
- Normality to meq/mL Conversion Calculator1.0000 meq/mL
- Normality Test Q-Q Plot: How to Read It
- Normality Test Results: How to Analyze Them
- Normality Test for Paired t Test: How to Check
- Normality Slay the Spire?