Virtual Labs: How Simulations Teach Science and Engineering Online
December 3, 2026 · 10 min read

Laboratory work is central to science and engineering education, yet many schools lack equipment, time, technicians or safe space, and online students may have no lab at all. Virtual labs are digital environments where students run experiments through simulations, remote control of real instruments or immersive 3D worlds. This guide explains the main types, what they do well and where they fall short, design principles from research, a tested pendulum simulation that shows where a textbook formula breaks down, assessment, the technology stack, accessibility and indicative costs.
Types of Virtual Labs
| Type | How it works | Good for |
|---|---|---|
| Interactive simulations | Software models a physical system; students change variables and observe | Physics, chemistry, maths, early biology |
| Remote labs | Students control real equipment over the internet and see live data or video | Engineering, electronics, measurement skills |
| Virtual reality labs | Immersive 3D environments with simulated equipment | Procedures, safety training, expensive or dangerous experiments |
| Data labs | Students analyse real datasets from instruments or research projects | Statistics, environmental science, astronomy |
| Engineering simulators | Circuit, mechanical or fluid simulation software | Design and testing before building |
The best-known example is PhET Interactive Simulations at the University of Colorado Boulder. As the US National Science Foundation describes, the project was founded by Nobel laureate Carl Wieman and provides free, research-based simulations for students from primary school to university. Its 2025 impact report estimates the cost at around one to two US cents per simulation-based learning session, showing how cheaply well-built simulations can reach very large numbers of learners.
Strengths and Limits
| Strengths | Limits |
|---|---|
| Safe: no chemicals, high voltages or broken glass | Students do not practise physical handling of equipment |
| Cheap per student once built | Development of high-quality simulations is expensive |
| Unlimited repetition and instant reset | Real data is messy; simulations can be too clean |
| Shows invisible things: electrons, fields, molecules | Models simplify reality and can create misconceptions if poorly designed |
| Accessible remotely and for students with disabilities | Needs devices and connectivity |
Research generally finds that well-designed simulations can teach concepts as well as, and sometimes better than, traditional labs, while hands-on labs remain important for practical skills. Many educators therefore blend the two: students explore a concept in a simulation first, then carry out a shorter, more focused physical experiment, or use a virtual lab to prepare so that scarce lab time is used well. Virtual labs also let students repeat an experiment many times with different values, something rarely possible in a timed practical session.
Design Principles From Research
- Exploration first: let students play with variables before giving them a task; curiosity drives learning.
- Implicit guidance: controls and visual cues should suggest productive things to try without long instructions.
- Multiple representations: show the same phenomenon as animation, graph, numbers and equation, linked together.
- Make the invisible visible: show forces, fields, particles or energy flows that cannot be seen in a real lab.
- Realistic enough: include measurement uncertainty and friction where it matters, so students do not learn an idealised world only.
- Predict, observe, explain: ask students to predict an outcome before running the experiment, then explain any difference.
Example: A Pendulum Lab That Tests the Textbook
A classic physics lesson uses the formula T = 2π√(L/g) for the period of a pendulum. That formula is an approximation that works only for small swings. A virtual lab can let students discover this themselves. The tested Node.js example below simulates a 1-metre pendulum numerically, measures its period from zero crossings, compares it with the formula for starting angles from 5 to 90 degrees, and checks a student's measured value against the simulation within a tolerance.
// Virtual lab: simulate a pendulum numerically (semi-implicit Euler), measure
// the period by detecting zero crossings, and compare it with the small-angle
// formula T = 2*pi*sqrt(L/g). Students see where the textbook formula breaks down.
const g = 9.81;
function simulatePeriod(L, theta0Deg, dt = 0.0005) {
let theta = theta0Deg * Math.PI / 180, omega = 0, t = 0, crossings = [];
while (crossings.length < 3 && t < 30) {
const prev = theta;
omega += -(g / L) * Math.sin(theta) * dt; // update speed first, then angle (keeps energy stable)
theta += omega * dt; t += dt;
if (prev > 0 && theta <= 0 || prev < 0 && theta >= 0) crossings.push(t);
}
return crossings[2] - crossings[0]; // two consecutive half-swings = one full period
}
const L = 1.0, smallAngle = 2 * Math.PI * Math.sqrt(L / g);
console.log(`length ${L} m, small-angle formula: ${smallAngle.toFixed(3)} s`);
for (const a of [5, 20, 45, 70, 90]) {
const T = simulatePeriod(L, a);
console.log(`start ${String(a).padStart(2)} deg: simulated ${T.toFixed(3)} s (${((T / smallAngle - 1) * 100).toFixed(1)}% longer)`);
}
// a student's measured value is graded against the simulation, with a tolerance
const studentGuess = 2.10, sim45 = simulatePeriod(L, 45);
console.log(`student measured ${studentGuess} s at 45 deg: ${Math.abs(studentGuess - sim45) / sim45 < 0.03 ? "within 3% - accepted" : "check your timing"}`);
Output:
length 1 m, small-angle formula: 2.006 s
start 5 deg: simulated 2.007 s (0.0% longer)
start 20 deg: simulated 2.022 s (0.8% longer)
start 45 deg: simulated 2.087 s (4.0% longer)
start 70 deg: simulated 2.211 s (10.2% longer)
start 90 deg: simulated 2.368 s (18.0% longer)
student measured 2.1 s at 45 deg: within 3% - accepted
At 5 degrees the simulation matches the formula almost exactly, but at 45 degrees the real period is 4 per cent longer and at 90 degrees it is 18 per cent longer, which matches the known exact result for large swings. The semi-implicit Euler method updates speed before position, which keeps energy stable over many swings; a simpler method would make the pendulum slowly gain energy, a classic bug in student-built simulations. In a React interface, the same engine drives an animated pendulum, sliders for length and angle, and a live graph, while the grading check gives instant feedback on a student's own measurement.
Remote Labs: Real Equipment Over the Internet
Remote labs give students the authenticity of real measurements without being in the room. A student books a time slot, opens a web page and controls actual equipment, such as an oscilloscope, a robot arm, a spectrometer or a small wind tunnel, while watching a live camera and receiving real data. Universities often share remote labs between campuses, so one expensive instrument serves hundreds of students. Building one involves more than software: equipment needs safety interlocks, limits on what users can change, automatic reset between sessions and monitoring for faults. A booking and queuing system shares time fairly, and every session should be logged so teachers can review what each student did. Remote labs combine well with simulations: students explore the model first, then test it against the real system.
Assessment and Learning Analytics
Virtual labs generate rich data about how students experiment, not only what they answer. Useful features include:
- Embedded prediction and explanation questions with automatic feedback.
- Logs of which variables a student changed, showing whether they controlled variables systematically.
- Exportable data tables so students practise analysis in spreadsheets or code.
- Lab reports submitted through the platform and marked with rubrics.
- Randomised parameters so each student gets slightly different values, reducing copying.
For graded lab quizzes and practical exams, connect the lab to online exam software with suitable security for the stakes.
The Technology Stack
- React for controls, layout and state, with the simulation engine kept separate and testable.
- Rendering: HTML Canvas or SVG for 2D, WebGL libraries such as Three.js for 3D, and WebXR for VR headsets.
- Physics and chemistry engines: custom numerical models for teaching clarity, or libraries for rigid bodies, circuits and molecular dynamics.
- WebAssembly for heavy calculations, compiled from C++ or Rust, so simulations run smoothly on modest laptops.
- Remote lab layer: device control APIs, booking and queuing, live video and safety interlocks for real equipment.
- Integration: LTI 1.3 to launch labs from an LMS and return grades, and xAPI for detailed activity data.
- Offline mode: simulations packaged to run without a connection, important for schools with poor internet.
Accessibility and Inclusion
Virtual labs can open science to students who cannot use a traditional lab, but only if they are designed inclusively. Provide keyboard control for every interaction, screen reader descriptions of what is happening, sonification (turning data into sound), adjustable speeds and high-contrast colour schemes that do not rely on red and green alone. PhET's work on inclusive simulations shows that these features can be built into interactive science content from the start rather than added later.
Using Virtual Labs in Live Teaching
Simulations work especially well in live online or hybrid lessons: the teacher demonstrates, then sends groups into breakout rooms to run their own experiments and report back. Our guide to virtual classroom software covers the live teaching tools that pair with labs. For where science education technology is heading, including AI lab assistants and VR, see our overview of EdTech trends.
Development Process
- Define learning goals with teachers: which misconceptions should the lab address?
- Design the model: decide what to simulate accurately and what to simplify, and document the assumptions.
- Prototype and test with students: watch what they try and where they get confused.
- Validate the science: compare results with known solutions or real data, as the pendulum example does.
- Build teacher materials: activity sheets, answer guides and suggested lesson plans.
- Pilot in classrooms and refine before scaling.
Common Mistakes
- Simulations that look impressive but do not target a specific learning goal or misconception.
- Models that are scientifically wrong in subtle ways because they were never validated.
- Long text instructions instead of interfaces that invite exploration.
- Accessibility left until the end, when it is expensive to add.
- No teacher materials, so the lab is rarely used in lessons.
Indicative Costs
The figures below are indicative estimates; scientific validation and accessibility work should be included in every budget.
| Scope | What is included | Indicative estimate |
|---|---|---|
| Single interactive simulation | One topic, controls, graphs, worksheet, accessibility basics | USD 15,000 to 50,000 |
| Virtual lab suite | 10 to 20 simulations, shared engine, teacher dashboard, LMS integration | USD 150,000 to 400,000 |
| Remote lab | Real equipment, control software, booking system, live video and data | USD 80,000 to 250,000 plus hardware |
| VR lab | 3D environment, interactions, headset and desktop versions | USD 100,000 to 300,000+ |
Frequently Asked Questions
What are virtual labs?
Digital environments where students run experiments through simulations, remote control of real equipment or immersive 3D environments.
Are virtual labs as good as real labs?
For understanding concepts, well-designed simulations can be as effective; for hands-on skills, physical labs are still needed, so blending works best.
What is a remote lab?
Real laboratory equipment that students control over the internet, seeing live data and video from the actual experiment.
Which subjects suit virtual labs?
Physics, chemistry, biology, earth science, maths and engineering all use them, especially for experiments that are dangerous, expensive or invisible.
What technology is used to build virtual labs?
Web technologies such as React with Canvas or WebGL, numerical simulation engines, WebAssembly for heavy calculation and WebXR for VR.
Can virtual labs be accessible to blind students?
Yes, with keyboard control, screen reader descriptions and sonification of data, if accessibility is designed in from the start.
Build Engaging Virtual Labs
Effective virtual labs combine sound science, thoughtful learning design and smooth, accessible interfaces. Our team builds React simulation platforms, validated physics and chemistry engines, remote lab control systems, VR experiences and LMS integrations. This article is general information, and costs are indicative estimates. Contact us to discuss your virtual labs project.