# Allele Frequency Calculator (p = (2AA + Aa) / 2N)

Compute allele frequencies from genotype counts: p = (2AA + Aa) / 2N, q = (2aa + Aa) / 2N. Derived from Hartl & Clark 2007, Griffiths, StatPearls. Educational use only.

> Canonical page: https://elysiatools.com/en/tools/allele-frequency-calculator

- **Category:** Education

- **Keywords:** allele frequency, allele frequency calculator, gene frequency, p frequency, q frequency, biallelic, genotype count, population genetics, genetics, biology

## Overview

The Allele Frequency Calculator computes p and q for a biallelic locus from observed AA, Aa, and aa genotype counts. It reports the population size, total allele count, copies of each allele, and results rounded to your selected number of decimal places. Educational use only.

## Inputs

- **AA count (homozygous dominant)** (number): Observed count of genotype AA.
- **Aa count (heterozygous)** (number): Observed count of genotype Aa.
- **aa count (homozygous recessive)** (number): Observed count of genotype aa.
- **Decimal Places** (number)

## When to use

- Calculate allele frequencies from observed genotype counts in a population genetics exercise.
- Convert AA, Aa, and aa counts into allele-copy totals for a biallelic locus.
- Check whether p and q sum to 1 using a consistent, repeatable calculation.

## How it works

- Enter the observed counts for AA, Aa, and aa individuals.
- The calculator determines N and the total number of alleles as 2N.
- It calculates p with (2AA + Aa) / 2N and q with (2aa + Aa) / 2N.
- The JSON result includes p, q, N, totalAlleles, countA, and counta, rounded to the selected decimal places.

## Use cases

- Population genetics coursework involving allele and genotype frequencies.
- Laboratory or field studies summarizing observed biallelic genotype counts.
- Teaching demonstrations of how homozygotes and heterozygotes contribute allele copies.

## Frequently asked questions

### What inputs does the calculator require?

Enter the observed counts for AA, Aa, and aa genotypes.

### How is allele frequency p calculated?

p = (2AA + Aa) / 2N, where N is the total number of individuals.

### How is allele frequency q calculated?

q = (2aa + Aa) / 2N.

### Why is the total allele count 2N?

Each diploid individual carries two alleles at the locus, so N individuals provide 2N alleles.

### Can I control the number of decimal places?

Yes. Decimal Places can be set from 0 to 8, with 4 as the default.

## Related tools

- [Genotype Frequency Calculator](https://elysiatools.com/en/tools/genotype-frequency-calculator): Compute genotype frequencies from counts: freq = count / N. Also derives allele and phenotypic frequencies. Derived from Hartl & Clark 2007, Griffiths, StatPearls. Educational use only.
- [Hardy-Weinberg Equilibrium Calculator (p² + 2pq + q² = 1)](https://elysiatools.com/en/tools/hardy-weinberg-equilibrium): Compute allele and expected genotype frequencies under Hardy-Weinberg equilibrium. Two modes: allele frequency or genotype counts with chi-square test. Derived from Hardy 1908, Weinberg 1908, Wigginton 2005, StatPearls. Educational use only.
- [Audio Melody Contour Extractor](https://elysiatools.com/en/tools/audio-melody-contour-extractor): Extract a dominant melody path from audio and export MIDI, note events, a pitch contour, SVG, and JSON in one ZIP.
- [Audio to Multitrack MIDI (Draft)](https://elysiatools.com/en/tools/audio-to-multitrack-midi): Split a full mix into stems (drums/bass/other/vocals) and transcribe each to MIDI — a multi-track starting point for transcription
- [Audio Decrackler](https://elysiatools.com/en/tools/audio-decrackle): Remove crackles and subtle impulsive noise from audio files. Ideal for restoring old recordings, cassette tapes, and digitized vinyl with surface noise
- [Audio Codec Swap](https://elysiatools.com/en/tools/audio-codec-swap): Change the codec of an audio file within a chosen output format
- [Audio Cutter](https://elysiatools.com/en/tools/audio-cutter): Cut and extract audio clips from audio files with precise time selection
- [Audio Declicker](https://elysiatools.com/en/tools/audio-declick): Remove clicks and pops from audio files caused by vinyl records, digital errors, or other impulsive noise sources

## Samples

- [Web Image Processing Python Samples](https://elysiatools.com/en/samples/web-image-processing-python): Web Python image processing examples using PIL/Pillow including reading, saving, resizing, and format conversion
- [Copyright-Free AAC Audio Samples](https://elysiatools.com/en/samples/aac-samples): High-quality AAC encoded audio samples for testing and development, featuring nature sounds and meditation music with excellent compression
- [Android Image Processing Java Samples](https://elysiatools.com/en/samples/android-image-processing-java): Android Java image processing examples including reading/saving images, scaling, and format conversion
- [Android Image Processing Kotlin Samples](https://elysiatools.com/en/samples/android-image-processing-kotlin): Android Kotlin image processing examples including reading/saving images, scaling, and format conversion

## Related content

- [Audio Encoding and Format Conversion Tools](https://elysiatools.com/en/hubs/audio-convert): Compare audio format conversion, bitrate changes, sample-rate conversion, codec swaps, and export tools in one hub for delivery and archive workflows.
- [Image Format Conversion and Animated Export Tools](https://elysiatools.com/en/hubs/image-convert): Compare image format converters for JPG, PNG, GIF, AVIF, WebP, TIFF, ICO, base64, and animation-friendly exports in one hub.
- [JSON Interchange and Format Translation Tools](https://elysiatools.com/en/hubs/json-convert): Compare JSON conversion tools for CSV, YAML, TOML, GraphQL, XML, Markdown, Excel, BSON, EDN, and related structured formats in one hub.
- [Color Space Conversion Tools for Web and Print](https://elysiatools.com/en/hubs/design-convert): Curated tools for web-to-print color space conversion in one hub.
