Example (preset)
Once you select an example, the input will be filled in and the results will appear immediately.
Inputs
Observed value (AA/Aa/aa)
Used only when df=2 (p fixed) is selected.
p specification (only expected frequency)
This mode does not calculate the χ² test (p-value).
Number of alleles (A, a)
This mode does not calculate the χ² test (p-value).
Advanced (display/graph)
Paste / CSV (optional)
It also supports pasting TSV/CSV (e.g.AA Aa aa). Once pasted, it will be reflected in the input field.
Results
—
*This is a statistical calculation tool and is not intended for medical judgment.
graph
*Residuals are displayed only in observed value mode (Advanced → "Show residuals").
Table (O/E/Contribution)
| genotype | observed(O) | expected(E) | O−E | (O−E)²/E | residual |
|---|
How to use/calculate
- Enter AA/Aa/aa (you can also use the example).
- Select degrees of freedom (default is df=1) and significance level (for display).
- p,q, expected frequency, χ², p-value are displayed.
allele frequency:p = (2·AA + Aa)/(2N), q = 1 − p
Expected frequency (HWE):E(AA)=p²N, E(Aa)=2pqN, E(aa)=q²N
χ²: Σ (O−E)²/E (sum of AA, Aa, aa)
If the expected frequencies are small, the χ² test may give a poor approximation. Please check the warning display before use.
Frequently asked questions (FAQ)
What is Hardy-Weinberg equilibrium (HWE)?
With two alleles (A and a), Hardy-Weinberg predicts genotype frequencies from p and q. The expected frequencies are p² (AA), 2pq (Aa), and q² (aa) under standard assumptions.
How do you calculate p and q?
From the observed AA/Aa/aa, calculate p = (2*AA + Aa)/(2N), q = 1 - p.
Why is the degree of freedom (df) of the χ² test often equal to 1?
Because p is estimated from observed values, df=1 is usually used for AA/Aa/aa counts. You can still choose df=2 as an advanced option.
A warning appeared if the expected frequency was small. What should I do?
If expected counts are small, χ² can be a rough approximation. Check sample size and category balance, and consider an exact test (not included in this tool).
Small p-value = not necessarily equilibrium, right?
The p-value measures how large the deviation is under the model. Do not draw conclusions from this number alone. Interpretation depends on sample size, assumptions, and data quality.
What is the difference from the χ² test for Mendelian separation ratio?
Both methods compare observed and expected counts. HWE is specific because expected frequencies come from p and q estimated from the same sample. Choose the test that matches your study design.
Are calculations from this tool sent externally?
Not sent. Calculations are completed within the browser.
How to use this calculator effectively
This guide helps you use Hardy-Weinberg equilibrium (law) calculation: Expected frequency/χ² in a repeatable way: define a baseline, change one variable at a time, and interpret outputs with explicit assumptions before you share or act on results.
How it works
The page applies deterministic logic to your inputs and shows rounded output for readability. Treat it as a comparison workflow: run one baseline case, adjust a single parameter, and measure both absolute and percentage deltas. If a result seems off, verify units, time basis, and sign conventions before drawing conclusions. This approach keeps your analysis reproducible across teammates and sessions.
When to use
Use this page when you need a fast estimate, a classroom check, or a practical what-if comparison. It works best for planning and prioritization steps where you need direction and magnitude quickly before investing in deeper modeling, manual spreadsheets, or formal external review.
Common mistakes to avoid
- Changing multiple parameters at once, which hides the true cause of output movement.
- Mixing units (percent vs decimal, monthly vs yearly, gross vs net) across scenarios.
- Comparing with another tool without aligning defaults, constants, and rounding rules.
- Using rounded display values as exact downstream inputs without re-checking precision.
Interpretation and worked example
Run a baseline scenario and keep that result visible. Next, modify one assumption to reflect your realistic alternative and compare direction plus size of change. If the direction matches your domain expectation and the size is plausible, your setup is usually coherent. If not, check hidden defaults, boundary conditions, and interpretation notes before deciding which scenario to adopt.
See also
FAQ
What should I do first on this page?
Start with the minimum required inputs or the first action shown near the primary button. Keep optional settings at defaults for a baseline run, then change one setting at a time so you can explain what caused each output change.
Why does this page differ from another tool?
Different pages often use different defaults, units, rounding rules, or assumptions. Align those settings before comparing outputs. If differences remain, compare each intermediate step rather than only the final number.
How reliable are the displayed values?
Values are computed in the browser and rounded for display. They are good for planning and educational checks, but for regulated or high-stakes decisions you should validate assumptions with official guidance or professional review.
Can I share and reproduce this result?
Yes. Use the share or URL controls when available. Keep a baseline case and one changed case so others can reproduce your reasoning and verify that the direction and scale of change are consistent.
Is my input uploaded somewhere?
Core calculations run locally in your browser. Some pages encode parameters in a shareable URL, but no automatic upload is performed unless you explicitly share that link.
Related tools
- Hardy–Weinberg equilibrium and chi-square calculatorcalculators, hardy-weinberg-equilibrium, calculator, biology, hardyweinberg, equilibrium, en
- A260 Calculator (DNA/RNA Concentration & Purity) | CalcBEcalculators, a260, calculator, en
- Beta diversity calculator (Jaccard / Bray–Curtis) | CalcBEcalculators, beta-diversity, calculator, en
- Cell seeding calculator | cells/well → required volume | CalcBEcalculators, cell-seeding, calculator, en
- Centrifuge converter (rpm ↔ RCF ×g) | by rotor radius | CalcBEcalculators, centrifuge-rcf-rpm, calculator, en