Gel Electrophoresis Virtual Lab: Cut, Load, Run and Read DNA
Pipette DNA into the wells, switch on the power and watch fragments separate by size, then measure the bands, size them with a standard curve and solve a DNA fingerprinting case.
Real gels fail in a few classic ways. Tick one, load a well and run the gel to see what it does.
Also try: leads Reversed and 200 V (Power), Water as buffer or None as stain (Gel), 2 µg of DNA (Samples), or a 2-hour run with "Stop at ¾" off.
Measurements
Measure marker bands and choose their sizes to draw the standard curve.
Press 📏 Measure under the gel image, then click the middle of each band. Marker bands get their known size; every other band is sized from the standard curve.
| # | Lane | Distance (mm) | Size (bp) |
|---|
Lab notebook
Every well you load and every run is written here. Export a CSV, or turn the session into a PDF lab report.
| # | What | Settings | Result |
|---|
Concept library
Click "New problem" to begin.
Click "Start quiz" for 5 questions on how gels work, restriction enzymes, the standard curve, DNA fingerprinting and troubleshooting.
1 Overview
Simulate shows the gel box on the left and what you observe on the right: the stained Gel, your standard Curve and the restriction Map. Choose a rack of samples in the top bar: λ DNA digests (AP Biology Lab 9), the pUC19 plasmid, DNA ladders, a crime scene, a paternity test or a custom digest. Experiment has six practicals with a lab report; Quiz has practice questions and a 5-question quiz.
2 Loading the wells
- Click a tube in the rack (on the bench, or in the Samples panel), then click a well: the micropipette loads it and the blue loading dye sinks in. Each well takes one sample; ↺ pours a new gel.
- Set the mass of DNA per lane, the digestion time (short digests leave partial bands) and whether λ digests are heated to 65 °C (it separates λ's sticky cos ends).
- Load all fills the empty wells with the rack in order (a learning aid).
3 Running the gel
- Press ▶ to switch the power on. Bubbles rise from both wires and the blue dye fronts move toward the red (+) electrode. The clock runs at 1 min per second by default; the speeds are in the transport bar.
- The run stops when the blue dye is ¾ of the way down (switch it off in Power to over-run) or when the run time is reached. You can change the voltage while it runs.
- The agarose %, buffer, comb and stain are set in the Gel panel; changing the first three pours a new gel.
4 Measuring and the standard curve
Under the gel image press 📏 Measure and click the middle of a band: its distance from the well is written to the Measurements table. For a marker band, choose its known size; tick or untick "curve" to leave out compressed or faint bands. Once two or more standards are measured, Curve draws log(size) against distance with the best-fit line, and every other band gets its size from the line. In Simulate, bands snap to their centre and hovering a band shows its size; Measure all measures every band.
5 DNA fingerprinting
The crime-scene and paternity racks hold PCR products of two loci from seeded people: D1S80 (a 16 bp repeat, 369–801 bp) and PV92 (an Alu insertion, 641 or 941 bp). Run them next to a 100 bp ladder in a 2 % gel. 🎲 New case makes new people; add ?case=123 to the address to give a class the same case.
6 Experiment mode and the lab report
Six labs: your first gel, an unknown enzyme, the AP Lab 9 standard curve, choosing the agarose %, a crime scene and a paternity test. Each shows its aim, what you need and a safety note; the method ticks off as you work, and a conclusion question ends it. Then create a PDF lab report with the gel image, your measurements, the curve and the working.
7 Units and keyboard
- SI | US switches temperatures between °C and °F. DNA sizes (bp), masses (ng), volumes, voltages and gel distances (mm) are metric in every lab, so they do not change.
- Space power on/off, N new gel, M measure, V Gel box / Molecules, 1–3 Gel, Curve, Map, S Status, Esc close. Right-click a view to save it as an image.
Gel electrophoresis virtual lab: separate DNA by size and read the bands
Gel electrophoresis separates DNA fragments by length. Samples go into wells at one end of an agarose gel, an electric field pulls the negatively charged DNA through the gel toward the positive electrode, and the gel's pores hold long fragments back more than short ones. This free gel electrophoresis virtual lab lets you do the whole procedure in the browser: cut DNA with restriction enzymes, load the wells, run the gel, stain it, measure the bands and size them with a standard curve. Every band comes from real DNA sequences and a mobility model calibrated to published agarose data.
- DNA
- λ DNA (48,502 bp) cut with EcoRI, HindIII, BamHI and XhoI; pUC19 plasmid; λ/HindIII, 1 kb and 100 bp ladders; D1S80 and PV92 PCR products
- Variables
- Agarose 0.7–3 %, TAE or TBE, 25–200 V, run time, DNA per lane, digestion time, heating, stain
- Measurements
- Band distances in mm, a semi-log standard curve and the size of every unknown band
- Modes
- Simulate, Experiment (6 practicals with a PDF report) and Quiz
- Price
- Free, no account or download; works on Chromebooks, tablets and phones
How gel electrophoresis works
Each nucleotide carries one negatively charged phosphate group, so every DNA molecule has the same charge for its length and is pulled toward the anode (+). In free solution all DNA would therefore move at the same speed. The agarose gel is what sorts it: it is a mesh of sugar fibres with pores a few hundred nanometres wide. Short fragments slip through quickly; long ones have to snake through end-first (reptation). The result is that the distance a fragment travels falls with the logarithm of its length. The buffer (TAE or TBE) carries the current and holds the pH steady; electrolysis makes hydrogen bubbles at the cathode and half as much oxygen at the anode.
Steps of gel electrophoresis
- Pour the gel: melt agarose in buffer, pour it into a casting tray with a comb, and let it set; remove the comb to leave the wells.
- Prepare the samples: cut the DNA with restriction enzymes (or amplify it by PCR) and mix it with loading dye, whose glycerol makes it sink.
- Load the wells: with the wells at the black (−) end, pipette a DNA ladder into one well and the samples into the others.
- Run: close the lid, connect black to black and red to red ("run to red") and apply 5–8 V per cm until the blue dye is about three quarters down.
- Stain and view: the DNA glows under blue light (SYBR Safe) or UV (ethidium bromide). Photograph the gel and measure the bands.
How to read a gel and calculate fragment size
Each band is millions of copies of one fragment length. The smallest fragments are furthest from the wells. To find a band's size, measure how far each band of the ladder travelled, plot the sizes on a log scale against distance (a standard curve) and draw the best straight line through the middle part. Then measure the unknown band and read its size off the line. In the simulator's AP Biology Lab 9 practical, a curve made from the λ/HindIII marker sizes the EcoRI and BamHI fragments of λ to within about 5–10 %. Leave out the 23,130 bp band: in a 1 % gel all very long fragments bunch up near the wells.
| Enzyme | Site | Cuts | Fragments (bp) |
|---|---|---|---|
| HindIII | A↓AGCTT | 7 | 23130, 9416, 6557, 4361, 2322, 2027, 564, 125 |
| EcoRI | G↓AATTC | 5 | 21226, 7421, 5804, 5643, 4878, 3530 |
| BamHI | G↓GATCC | 5 | 16841, 7233, 6770, 6527, 5626, 5505 |
| XhoI | C↓TCGAG | 1 | 33498, 15004 |
Which agarose percentage?
Denser gels have smaller pores and spread out small fragments; looser gels separate large ones. As a rule of thumb, 0.7 % resolves about 0.8–20 kb, 1 % about 0.5–10 kb and 2 % about 0.1–2 kb. The tracking dyes help you judge the run: in 1 % agarose, bromophenol blue runs with roughly 300 bp DNA and xylene cyanol with about 4 kb.
DNA fingerprinting and paternity testing
Some places in the genome vary in length from person to person. D1S80 is a 16-base sequence repeated 14 to 41 times, and PV92 either carries a 300-base Alu element or not. PCR copies the region and the gel shows each person's two alleles as one or two bands. A crime-scene sample matches a suspect only if every band lines up; a child carries one allele from each parent at every locus. One locus is evidence, not proof: forensic labs now compare 20 short tandem repeats by capillary electrophoresis, and the chance that a stranger matches them all is far below one in a billion.
Troubleshooting a gel
No bands: the leads were reversed (the DNA ran out of the top), there was no stain, or the sample floated away without loading dye. Smears: too much DNA, a pierced well or degraded DNA. Curved, "smiling" bands: the voltage was too high and the gel heated in the middle. Extra faint bands: an incomplete digest. Missing small bands: the gel ran too long. Every one of these can be tried in the Mistakes panel.
Experiments and course links
| Lab | What you find out | Course links |
|---|---|---|
| Your first gel | Which way DNA moves and why | NGSS HS-LS1-1; GCSE and IGCSE biotechnology |
| Which enzyme cut it? | Identify an unknown digest from its pattern | AP Biology 6.8; A-level 3.8.4 |
| Standard curve | Fragment sizes from a semi-log plot | AP Biology Investigation 9; IB D1.1 |
| Agarose percentage | How pore size sets the resolving range | College molecular biology |
| Crime scene and paternity | DNA fingerprinting with D1S80 and PV92 | NGSS HS-LS3-1; forensic science; A-level genetic fingerprinting |
Who uses this gel electrophoresis simulation?
High school students in AP Biology, NGSS biology, GCSE, A-level and IB who meet biotechnology and DNA fingerprinting; college students in introductory molecular biology; and teachers whose school has no gel boxes, power supplies or budget for DNA kits, or who want students to practise before a real lab. It is an educational model: real gels vary with the agarose, buffer, box and stain.
Frequently asked questions
What is gel electrophoresis used for?
Gel electrophoresis separates DNA, RNA or protein molecules by size. It is used to check that a PCR or a restriction digest worked, to measure the length of DNA fragments against a ladder of known sizes, to compare DNA in forensic and paternity tests, to diagnose genetic variants that change a fragment's length, and to purify a fragment for cloning. In a typical school lab, λ DNA cut with restriction enzymes is run beside a size marker and the fragment sizes are found from a standard curve.
Why does DNA move toward the positive electrode in gel electrophoresis?
DNA's backbone is a chain of sugars and phosphate groups, and each phosphate carries a negative charge at the pH of the running buffer. Opposite charges attract, so the electric field pulls DNA toward the positive electrode (the anode, the red lead). The wells are therefore placed at the negative (black) end: "run to red". Because the charge per unit length is the same for all DNA, it is the gel's pores, not the charge, that separate the fragments by size.
How do you calculate fragment size from a gel?
Measure the distance from the bottom of the well to the middle of each band of the DNA ladder, whose sizes are known. Plot the sizes on the log axis of semi-log paper (or log10 of the size) against distance and draw the best straight line through the middle bands, leaving out very large compressed bands. Then measure the distance of the unknown band, find it on the distance axis, go up to the line and across to read the size. For example, if log10(bp) = 4.9 − 0.06 × distance in mm, a band at 25 mm is 10^3.4 ≈ 2,500 bp.
Explore related simulators
See the double helix that a restriction enzyme cuts, base pair by base pair, in the DNA Structure 3D Model. Read the genes these fragments carry with the Interactive Codon Chart and DNA to Protein Translator, and follow how the alleles you fingerprint are inherited in the Interactive Punnett Square Calculator. Restriction enzymes come from bacteria, where they cut up invading viruses: meet both in the Virtual Bacteria Simulator and the Virus Virtual Lab.
Sources: OpenStax Biology 2e, section 17.1; College Board, AP Biology Investigative Labs, Investigation 9; New England Biolabs λ DNA and pUC19 restriction maps; Green & Sambrook, Molecular Cloning 4th edition, chapter 2; Stellwagen et al., Biopolymers 42 (1997); Budowle et al., Am. J. Hum. Genet. 48 (1991); Bio-Rad PV92 PCR kit manual. An educational model: not for laboratory, forensic or legal use.
Updated