How to Create a Virtual Lab Activity

Updated 2026-10-02

A good virtual lab activity looks a lot like a good real practical. There is a question to answer, variables to control, a table of measurements, and a conclusion backed by evidence. What changes is the equipment: a simulation that resets in a second, never breaks and can't hurt anyone. This guide walks you through designing a virtual lab from scratch. You'll set the learning goal, choose the variables, build the data table, check measured values automatically with number questions, and write analysis questions that make students think. At the end there is a complete, ready-to-use lab on measuring g with a pendulum, including the data students should get.

Step 1: Start with a measurable learning goal

Write the goal as something students will find out, not something they will learn about. "Learn about pendulums" gives you nothing to design around. "Find the value of g by measuring how the period of a pendulum depends on its length" tells you the variables, the data table, the graph and the final answer.

A useful test: can you write the final number or relationship students should reach? If you can, the goal is measurable. Examples:

  • "Show that the current through a resistor is proportional to the voltage, and find its resistance."
  • "Find the sugar concentration that matches potato cell sap."
  • "Find how the rate of photosynthesis changes with light intensity, and where it levels off."

Then pick a simulation that can really produce that data. Open it, find the controls, and run the experiment once yourself before you write anything else. Many lab designs fail because the simulation measures something slightly different from what the worksheet asks for.

Step 2: Identify the variables

Every lab has three kinds of variables. Write them out in a table for yourself first, then decide how much of it students should work out on their own.

Variable type Question to ask Pendulum example
Independent What will students change on purpose? String length L
Dependent What will they measure? Time for 10 oscillations, then the period T
Controlled What must stay the same for a fair test? Amplitude, number of oscillations timed, g

In a virtual lab, controlled variables are easy to keep constant. That's a strength, but it can hide the idea of control from students. Make it visible: ask students to list the controlled variables and say what would happen if one of them changed. Better still, let them break the rule once on purpose. In the pendulum lab, raising the amplitude to 40° gives a systematic error they can see.

For younger students, or when you are first teaching variables, use the fair test simulation beforehand. It warns students when they change two factors at once and lets them practice naming independent, dependent and control variables.

Fair test – planning an experiment and controlling variables

Step 3: Design the data table

Give students the table structure, but leave the numbers empty. A well-designed table teaches method on its own.

  • Include units in the headers, not in the cells: "L (m)", "t for 10 oscillations (s)".
  • Plan repeats. Three trials per value, then a mean, is the habit to build. Simulations with random variation built in, like reaction time in the pendulum lab, make repeats meaningful.
  • Add calculated columns for anything students must work out (T = t/10, T²). Students then see the path from raw data to the graph.
  • Choose 5–6 values of the independent variable spread across the full range. Clustered values give a poor graph.

If you want students to practice plotting by hand first, the plotting graphs simulation teaches scales, lines of best fit and anomalous points with ready-made data sets.

Step 4: Check measured values with number questions

This is where a virtual lab beats a paper worksheet. On the simulation's Share page, open the Questions tab and build a question set for the link you give students. A number question is checked automatically against your answer with a tolerance and an optional unit. For example, "the period of the 1.00 m pendulum is 2.01 s ± 0.04".

How to set the tolerance:

  1. Run the experiment yourself several times and note the spread of results.
  2. Set the tolerance to cover honest measurement, usually 2–3 times the spread you saw. Too tight, and careful students are marked wrong. Too loose, and the check means nothing.
  3. Make calculated values a bit looser than direct readings, because errors add up through each step of the calculation.
  4. Always set the unit, so students practice writing it.

You can add an explanation that appears after a student answers (for example, the correct working) and allow up to two retries. Retries are useful in a lab: a student who is far off can go back, re-measure and try again, which is exactly the behavior you want.

A question set holds up to five questions, so spend them carefully. Use two or three number questions for key measurements and results, and one or two short-text questions for analysis. You see every answer in the results table for the link and can export it as CSV. The free plan includes 100 student answers per month; Pro removes the limit (see pricing).

For a deeper look at writing questions, see how to add simulations to quiz questions.

Step 5: Write analysis questions that need the data

Analysis questions should be impossible to answer without the student's own results. Avoid questions students can answer from a textbook. Strong analysis questions ask students to:

  • describe the pattern with numbers: "When L increases from 0.40 m to 1.60 m, by what factor does T change?";
  • explain the method: "Why do we time 10 oscillations instead of one?";
  • evaluate errors: "Which of your results is least reliable, and why?";
  • extend: "Predict the period of a 2.0 m pendulum, then test your prediction."

End with a conclusion that answers the goal from Step 1 in one or two sentences, with a number.

Virtual vs real labs: safety and what changes

The obvious advantage of a virtual lab is safety. Students can explore hazardous chemistry, such as diluting concentrated sulfuric acid, electrical faults or radioactive decay, with no risk at all. Mistakes cost nothing, so students can try the "wrong" setting and see why it's wrong.

Other advantages are practical: no setup time, no broken equipment, no shared kit, and the same experiment for every student, at school or at home.

Be honest about what students miss:

  • Handling skills. Students don't learn to use a stopwatch, a burette or a balance from a screen.
  • Real messiness. Real data has odd sources of error: a string that stretches, a draft in the room. A model only has the errors someone built into it.
  • Troubleshooting. When a real experiment fails, students have to work out why. That skill is hard to simulate.

The strongest approach is often a pairing. Run the virtual lab as a pre-lab, so students arrive at the real bench knowing what to measure and what the graph should look like. Or run it after the real lab, to test values the school equipment can't reach. When real equipment isn't available at all, a well-designed virtual lab is far better than reading about the experiment.

Complete example: measuring g with a simple pendulum

This lab suits ages 14–18 and takes about 45–50 minutes. It uses the measuring g with a simple pendulum simulation. Students time oscillations with a stopwatch, either by hand or with a simulated "auto experimenter" whose reaction time varies at random. The simulation plots T² against L and fits the best-fit line.

Measuring g with a simple pendulum

Setup for the teacher

Create a class link on the Share page and pin these starting values (they are also the defaults):

  • String length: 1.00 m
  • Oscillations per timing: 10
  • Reaction-time spread (σ): 0.15 s
  • Angular amplitude: 10°
  • True gravitational acceleration: 9.81 m/s²

The simulation itself never shows the true g, but on an ordinary link the starting-values panel under the simulation does list it, and students could change it there. To keep it secret, turn on locked parameters for the link (a Pro option): the simulation then always runs with your pinned values and shows no starting-values panel. Without Pro, keep 9.81 m/s² and simply ask students not to open the panel; the lab still works, because they have to measure g themselves to check it.

For an extension class with locked parameters, pin a different true g on a second link, for example 3.71 m/s² for Mars, and turn the lab into "identify the planet".

Student sheet

Goal: Find the acceleration due to gravity g by measuring how the period of a pendulum depends on its length.

Background: For small swings, T = 2π√(L/g). Squaring both sides gives T² = (4π²/g)·L, so a graph of T² against L is a straight line through the origin with gradient k = 4π²/g. That means g = 4π²/k.

Method:

  1. Set the length L to 0.40 m. Leave the amplitude at 10° and the timing at 10 oscillations.
  2. Time 10 oscillations by hand once: press Start timing as the bob passes the marker moving right, count the passes and press Stop timing after 10 oscillations.
  3. Use Auto experimenter for two more trials at the same length.
  4. Repeat for L = 0.60, 0.80, 1.00 and 1.20 m.
  5. Record every trial in your table and work out T and T².
  6. Read the gradient and g from the best-fit line shown in the simulation.

Data table:

L (m) t₁ (s) t₂ (s) t₃ (s) mean t (s) T = t/10 (s) T² (s²)
0.40
0.60
0.80
1.00
1.20

Expected results (teacher copy)

These values come from the simulation's period formula at a 10° amplitude with g = 9.81 m/s². Student values will scatter around them because of the random reaction time: with σ = 0.15 s, a single 10-oscillation timing typically varies by about ±0.2 s, so T varies by about ±0.02 s.

L (m) t for 10 oscillations (s) T (s) T² (s²)
0.40 12.71 1.271 1.62
0.60 15.57 1.557 2.42
0.80 17.98 1.798 3.23
1.00 20.10 2.010 4.04
1.20 22.02 2.202 4.85

The gradient is about 4.04 s²/m, which gives g = 4π²/4.04 ≈ 9.77 m/s². That is about 0.4% below the true 9.81 m/s². The small gap is real, not a student mistake: a 10° swing makes the period about 0.2% longer than the small-angle formula predicts. That's a good discussion point about systematic error.

At a 40° amplitude the 1.00 m pendulum's period rises to about 2.07 s, and a single-length calculation gives g ≈ 9.2 m/s², about 6% too low.

  1. Number: What is the period T of the 1.00 m pendulum? Answer 2.01 s, tolerance ± 0.04 s. Explanation shown after answering: "T = t/10. With 20.1 s for 10 oscillations, T = 2.01 s."
  2. Number: What is the gradient of your T² against L graph? Answer 4.04 s²/m, tolerance ± 0.15 s²/m.
  3. Number: What value of g did you find? Answer 9.8 m/s², tolerance ± 0.3 m/s². Allow two retries.
  4. Multiple choice: Why do we time 10 oscillations and divide by 10?
      1. The pendulum speeds up after a few swings
      1. The reaction-time error is the same for 1 or 10 oscillations, so dividing by 10 makes it 10 times smaller ✔
      1. It gives a more accurate value of L
      1. Ten swings are needed for the pendulum to settle
  5. Short text: Set the amplitude to 40° and time the 1.00 m pendulum again. Is the g you calculate larger or smaller than before? Explain why. Model answer: smaller. A large swing makes the period longer than 2π√(L/g), so dividing by a larger T² gives a smaller g. This is a systematic error, and repeating the measurement doesn't remove it.

Extension questions (on paper or for discussion)

  • Change Oscillations per timing to 1 and repeat one length five times. How does the spread of T compare with timing 10 oscillations?
  • Raise the reaction-time spread to 0.30 s. What happens to the uncertainty in g reported by the best-fit line?
  • On the Mars link, what period does a 1.00 m pendulum have? (About 3.27 s at a 10° amplitude.)

Reuse the pattern

The five design steps (goal, variables, table, number checks, analysis) work for any measurable relationship. Swap in Ohm's law (find R from the I–U graph), potato strips (find the cell sap concentration) or photosynthesis bubbles (find where light stops being limiting), and keep the same structure.

To place a virtual lab inside a full lesson, see the 5E lesson plan with interactive simulations. The lab fits naturally in the Explore and Elaborate phases. To open the lab with a prediction, see Predict–Observe–Explain with simulations. For a broader view of teaching with simulations, start with how to use interactive simulations in the classroom.

FAQ

How do I choose the tolerance for a number question?

Run the experiment yourself several times and set the tolerance to about 2–3 times the spread you see. Use a slightly looser tolerance for calculated results like g than for direct readings like T.

Do students need accounts to submit lab answers?

No. Students open the link, type a nickname and answer below the simulation. Ask for a nickname or first name only. You see the answers in the results table and can export them as CSV.

Can a virtual lab replace a required practical?

Check your exam board's rules first. In most courses a virtual lab works best as preparation or follow-up for the real practical. It's a good substitute only when the real experiment is unsafe, too expensive or not possible.

How many questions can I attach to a lab?

Up to five per question set, plus instructions for students. If you need more, put extra analysis questions on a paper or LMS worksheet alongside the simulation.