P1 and P2 show up across several fields, from statistics to physics to genetics, and the way you find them depends entirely on the context. The core idea is almost always the same: P1 represents a starting or first-group value, and P2 represents a second or comparison value. Here’s how to calculate them in the most common scenarios.
Sample Proportions in Statistics
This is the most common reason people search for P1 and P2. In statistics, when you’re comparing two groups, P1 (written as p̂₁) and P2 (written as p̂₂) are the sample proportions for each group. The formula is straightforward:
- p̂₁ = x₁ / n₁ (number of successes in group 1 divided by the total size of group 1)
- p̂₂ = x₂ / n₂ (number of successes in group 2 divided by the total size of group 2)
“Successes” just means whatever outcome you’re counting: patients who recovered, customers who clicked a button, students who passed an exam. Say you surveyed 605 people in one city and 351 said they support a policy, while 195 people in another city were surveyed and 41 support it. Your two proportions would be p̂₁ = 351 / 605 = 0.58 and p̂₂ = 41 / 195 = 0.21.
Once you have p̂₁ and p̂₂, you can compare them using a hypothesis test (specifically a two-proportion Z-test). That test also requires something called the pooled proportion, which combines both groups into one number. You calculate it by adding all the successes together and dividing by the total number of people across both groups: p̂ = (x₁ + x₂) / (n₁ + n₂). In the example above, that’s (351 + 41) / (605 + 195) = 392 / 800 = 0.49.
The pooled proportion is used because the test assumes, as its starting point, that the two groups have the same underlying rate. You’re then checking whether the difference you observed is large enough to reject that assumption. The test statistic is Z = (p̂₁ − p̂₂) / √[p̂(1 − p̂)(1/n₁ + 1/n₂)]. You plug in your two sample proportions, the pooled proportion, and both sample sizes.
A/B Testing and Conversion Rates
If you work in marketing or product design, P1 and P2 are essentially the same concept applied to conversion rates. P1 is typically the baseline (your current design), and P2 is the variant you’re testing. You find each one by dividing conversions by total visitors.
For example, if 10,000 people see your original page and 400 convert, P1 = 400 / 10,000 = 0.04 (a 4% conversion rate). If another 10,000 people see the new version and 520 convert, P2 = 520 / 10,000 = 0.052 (5.2%). The absolute lift is simply P2 minus P1, which here is 1.2 percentage points. The relative lift tells you how much better the new version performed as a percentage of the original: 0.012 / 0.04 = 0.40, or a 40% improvement.
The statistical test to determine whether that difference is real (and not just random noise) works exactly the same way as the two-proportion Z-test described above. You’re still comparing two sample proportions from two groups.
Pressure in Boyle’s Law (Physics)
In physics and engineering, P1 and P2 refer to pressures at two different states, most commonly in Boyle’s Law. This law describes how gas pressure and volume are inversely related when temperature stays constant:
P1 × V1 = P2 × V2
To find either pressure, you rearrange the equation:
- P1 = (P2 × V2) / V1
- P2 = (P1 × V1) / V2
So if a gas starts at 2 atm in a 10-liter container and is compressed to 5 liters, P2 = (2 × 10) / 5 = 4 atm. The pressure doubles because the volume was cut in half. Note that all pressures here must be absolute pressures (not gauge readings), meaning they include atmospheric pressure.
Bernoulli’s Equation
In fluid dynamics, P1 and P2 appear in Bernoulli’s equation, which relates pressure, velocity, and height at two points along a flowing fluid:
P1 + ½ρV1² + ρgh1 = P2 + ½ρV2² + ρgh2
Here, ρ is the fluid’s density, V is velocity, g is gravitational acceleration, and h is height. To isolate P1 or P2, you move everything else to the other side. For horizontal flow (where height doesn’t change), this simplifies to P1 + ½ρV1² = P2 + ½ρV2². If you know the velocities and one pressure, you can solve for the other. Higher velocity at a point means lower pressure there, which is why airplane wings generate lift and why shower curtains get pulled inward.
Price Elasticity of Demand (Economics)
In economics, P1 and P2 are the initial and new prices of a good. They’re used to calculate price elasticity of demand, which measures how sensitive buyers are to a price change. The most reliable version is the midpoint (arc) formula:
Elasticity = [(Q1 − Q2) / (Q1 + Q2)] / [(P1 − P2) / (P1 + P2)]
P1 is simply the price before the change, and P2 is the price after. Q1 and Q2 are the quantities demanded at those prices. You don’t need to derive P1 and P2 from a formula; they come directly from your data. The midpoint formula is preferred because it gives the same elasticity value regardless of which direction the price changes, unlike simpler point formulas that produce different answers depending on which price you put in the denominator.
The P1 Generation in Genetics
In a completely different context, P1 (sometimes just called the P generation) refers to the parental generation in a genetic cross. Gregor Mendel’s classic pea plant experiments illustrate this. The P1 generation consists of the original true-breeding parents you start with: for example, a plant that always produces yellow peas crossed with one that always produces green peas.
Their offspring are the F1 (first filial) generation. In Mendel’s experiments, all F1 plants showed the dominant trait (yellow peas). When those F1 plants self-fertilized, they produced the F2 generation, which showed a 3:1 ratio of dominant to recessive traits. P1 isn’t calculated here; it’s identified. You “find” P1 by recognizing which organisms are the original parents in the cross.
P2 in genetics typically refers to the second parent in the cross. So if you’re crossing a yellow-pea plant with a green-pea plant, P1 is one parent and P2 is the other. Some textbooks label them simply as P rather than distinguishing P1 and P2, but when the distinction matters, it’s used to track which traits came from which parent.

