latencymeasurementtechnicalreaction timehow it works

How Does BrainRivals Measure Latency? A Technical Deep Dive

Get the short answer first, then use the benchmarks, examples, and BrainRivals practice links to turn the idea into a measurable result.

BrainRivals Team··Updated July 2, 2026·10 min read
How Does BrainRivals Measure Latency hardware latency article illustration

Quick Answer

This guide turns an abstract idea about reaction speed into something you can notice, measure, and improve. The fastest way to use it is to read the benchmark first, compare it with your own context, then run a related BrainRivals test under the same conditions for a cleaner before-and-after signal.

Key takeaways

  • Start with the practical benchmark, not the trivia.
  • Treat one score as a snapshot and repeated scores as the real signal.
  • Use the Reaction Time as the next measurable step.

How Does BrainRivals Measure Latency quick guide graphic

How Does BrainRivals Measure Latency benchmark loop graphic

How to Use This Guide

Use the article in three passes: scan the quick answer, check the tables or examples that match your situation, then pick one action to test this week. That keeps the article useful even if you only have a few minutes, while still giving you enough detail to come back for deeper context.

When you take a reaction time test, you're measuring the time between a visual stimulus appearing and you clicking a button. Simple enough, right?

Wrong. There are actually five layers of latency between stimulus and response, each adding milliseconds of noise to your measurement. Understanding these sources is critical for interpreting your scores and knowing what affects performance.

Let's walk through the technical architecture of how reaction time measurement works (and where it breaks down).

The Layers of Latency

From stimulus to response, here's what happens:

Stimulus Generation → Browser Rendering → Your Perception → Your Motor Response → Browser Detection → Measurement

Each layer adds latency:

1. Stimulus Generation (Typically 0-2ms)

When BrainRivals decides to show a stimulus, the JavaScript code calls:

const stimulusTime = performance.now();
// Display stimulus on screen
element.style.display = 'block';

But here's the first source of noise: the JavaScript code executes, but the stimulus doesn't appear on screen immediately.

The code runs on the JavaScript event loop. If the browser is busy (parsing CSS, running other scripts, garbage collection), your stimulus generation waits in the queue. This queue delay is typically <1ms for a well-optimized site, but can spike to 5-10ms if the browser is under load.

BrainRivals optimization: Minimize JavaScript work before stimulus presentation. Pre-compute animation calculations, pre-allocate memory, and keep the stimulus rendering path clean.

2. Browser Rendering Pipeline (5-25ms)

This is the big one. After JavaScript runs, the browser must:

  1. Recalculate styles – Apply CSS rules (1-2ms)
  2. Layout – Calculate element positions and sizes (2-5ms)
  3. Paint – Rasterize elements into pixels (2-5ms)
  4. Composite – Combine layers and prepare for GPU (1-3ms)
  5. Display – Send frame to monitor (varies, see below)

Together, this rendering pipeline takes 5-25ms depending on complexity.

BrainRivals optimization: Minimize CSS complexity, avoid layout thrashing, and use GPU-accelerated transforms. Our stimulus is a simple colored box with minimal styling—this keeps rendering time low (~5ms).

The catch: This is where monitor refresh rate becomes critical.

3. Monitor Refresh Rate (0-16.67ms for 60Hz, 0-8.3ms for 120Hz)

Monitors refresh at fixed intervals:

  • 60Hz: Every 16.67ms
  • 120Hz: Every 8.3ms
  • 144Hz: Every 6.9ms
  • 240Hz: Every 4.17ms

If your stimulus is ready to display at time T=5.5ms, but the monitor refreshes at T=0ms and T=16.67ms, your stimulus won't appear until T=16.67ms. That's an 11ms delay beyond the actual rendering time.

This is variable latency based on timing luck.

For reaction time measurement, this is massive. On a 60Hz monitor, you could have 0-16.67ms of display latency just from refresh rate. On a 240Hz monitor, that drops to 0-4.17ms.

BrainRivals approach: We calculate display timing based on when the frame actually appears (not when we request it). We use requestAnimationFrame() to synchronize with the monitor's refresh cycle and measure when the frame is actually composited.

4. Your Perception (30-100ms)

The stimulus is on screen. Now your eyes and brain have to process it.

  • Saccade latency (eye movement to fixate): 30-50ms
  • Visual processing (sensory cortex processes signal): 30-50ms
  • Conscious awareness (prefrontal cortex registers stimulus): 50-100ms

This is the biological layer. You're testing perceptual reaction time, not pure motor response time.

Important: Not all of this is "you being slow." Much of this is unavoidable neurobiology. The fastest humans (100-120ms reaction times) hit this biological floor.

5. Your Motor Response (30-50ms)

You decide to respond. Now your muscles have to activate:

  • Motor planning (motor cortex patterns movement): 20-30ms
  • Muscle activation (action potential propagation): 10-20ms
  • Mechanical response (muscle contraction): variable

Pressing a button takes ~30-50ms from decision to contact.

6. Browser Detection (1-5ms)

Your click (or key press) must:

  • Generate an OS event
  • Be delivered to the browser
  • Trigger a JavaScript event listener
  • Execute the response handler

This is typically <2ms on a local machine, but can spike with OS load or browser bloat.

BrainRivals approach: We use the most direct event listeners (raw mousedown/click events, not higher-level abstractions) to minimize event handling latency.

Total Latency Budget

Summing up:

Layer Min Max Notes
Stimulus generation 0 10 Event loop variability
Browser rendering 5 25 CSS/layout complexity
Monitor refresh delay 0 16.67 60Hz; reduces on 120Hz+
Visual perception 30 100 Biological, unavoidable
Motor response 30 50 Biological, skill-dependent
Event detection 1 5 Browser overhead
Total measured latency 66 207 Theoretical range

In practice, typical adult reaction times fall in the 150-300ms range (accounting for all layers).

The Measurement Accuracy Problem

Here's the critical issue: we're not measuring pure reaction time, we're measuring latency across all six layers.

A 200ms reaction time includes:

  • ~10ms stimulus generation/rendering/display (system overhead)
  • ~50-70ms perception (biological)
  • ~40ms motor response (biological)
  • ~20-40ms "extra" variability and decision time (your actual reaction skill)

When you improve from 210ms to 190ms, part of that improvement is you getting faster, and part might be system optimization or luck with monitor refresh timing.

This is why: On a high-refresh-rate monitor (120Hz+), reaction times are typically 10-15ms faster than on a 60Hz monitor with the same person reacting.

How BrainRivals Accounts for System Latency

We implement several strategies to minimize and account for measurement noise:

1. Performance.now() with High Resolution

We use performance.now() which provides microsecond precision (not millisecond). This lets us detect timing with sub-millisecond accuracy.

const stimulusTime = performance.now();
// ... stimulus appears ...
const responseTime = performance.now();
const reactionTime = responseTime - stimulusTime;

2. RequestAnimationFrame Synchronization

We synchronize stimulus presentation with the monitor's refresh cycle:

requestAnimationFrame((timestamp) => {
  const visualStimulusTime = timestamp;
  showStimulus();
  // Measure response against visual frame time, not JS execution time
});

This ensures we measure from when the stimulus actually appears, not when we requested it.

3. Multiple Attempts and Outlier Removal

We run multiple stimulus-response pairs and remove outliers:

  • Drop the first trial (learning effect, system warm-up)
  • Remove any trial >500ms (distraction, misclick)
  • Average the remaining trials

This reduces the impact of individual system variance.

4. Monitor Refresh Rate Detection

We attempt to detect your monitor's refresh rate and account for it:

let frameCount = 0;
let lastTimestamp = 0;
const frameIntervals = [];

requestAnimationFrame(function detectRefreshRate(timestamp) {
  if (lastTimestamp) {
    frameIntervals.push(timestamp - lastTimestamp);
  }
  lastTimestamp = timestamp;
  frameCount++;
  
  if (frameCount < 60) {
    requestAnimationFrame(detectRefreshRate);
  } else {
    // Calculate average frame interval = 1000/refreshRate
    const avgInterval = frameIntervals.reduce((a,b) => a+b) / frameIntervals.length;
    const refreshRate = Math.round(1000 / avgInterval);
  }
});

If we detect you're on a 60Hz monitor, we know there's inherent ~8ms additional variance compared to a 120Hz user. We can flag this in your score.

5. Display Lag Estimation

We measure the time from when we schedule a visual stimulus to when performance.observer detects the actual GPU frame. This gives us an empirical display lag measurement that we subtract from reaction time:

const estimatedDisplayLag = measureDisplayLag(); // typically 8-16ms
const displayLagAdjustedRT = reactionTime - estimatedDisplayLag;

This is controversial (some researchers think you shouldn't subtract display lag because it's part of your "real" reaction time), but it gives a more apples-to-apples comparison across different hardware.

What You Can Do to Minimize Noise

1. Use a 120Hz+ Monitor

High refresh rate displays reduce variable latency by ~80%. A 240Hz gaming monitor gives you a ~4ms refresh interval vs ~17ms on 60Hz.

Impact: 10-15ms improvement in measured reaction time, with less trial-to-trial variance.

2. Close Background Processes

Browser tabs, downloads, and OS services add event loop latency and can cause frame drops.

Impact: Reduces occasional spikes; smooths out outliers.

3. Disable Browser Extensions

Extensions hook into the rendering pipeline and add latency.

Impact: 5-10ms improvement.

4. Use a Wired Mouse/Keyboard

Wireless input adds ~5-15ms of latency compared to wired peripherals.

Impact: 5-15ms improvement.

5. Optimize for Your Device

  • Desktop: Lower display lag, faster input
  • Laptop: Higher display lag, trackpad slower than mouse
  • Tablet/Phone: Massive variability in touch latency; not recommended for precision measurement

6. Warm Up

Run 5-10 practice trials before recording real results. This:

  • Allows the browser to JIT-compile JavaScript
  • Gives the OS time to prioritize the browser
  • Lets your motor system warm up

Impact: 10-20ms improvement from practice effect + system optimization.

The Honesty Section

Our measurement is good, but it's not perfect. Here's what we can't control:

  • Biological variability: Your reaction time varies 10-20% trial-to-trial just from biology
  • Monitor variability: We can detect refresh rate, but can't control when in the cycle your stimulus appears
  • Input device variability: We can't measure your mouse/keyboard lag directly
  • OS scheduling: Sometimes the OS deprioritizes the browser; we can't prevent that

This is why:

  • Your score varies 5-10% day-to-day even if your true reaction time doesn't change
  • Comparing scores across devices is noisy (especially phone vs desktop)
  • Real improvements become visible after 5-10 tests, not after a single test

Bottom Line

When you see your reaction time on BrainRivals, you're seeing a measurement that includes:

  • ~10ms system overhead (stimulus generation, rendering, display)
  • ~50-70ms biological perception time (unavoidable)
  • ~40ms motor response time (unavoidable)
  • ~20-40ms actual reaction skill (the part you can train)
  • ~5-10ms measurement noise (system variability)

Improving your score by 20-30ms is meaningful and reflects real improvement in your reaction system. Obsessing over single-trial variance is noise.


Ready to see the real latency behind your reaction time? Take the Reaction Time Test right now and note your score—then apply the optimization strategies above (120Hz+ monitor, wired input, closed backgrounds). Test again in 2 weeks. The milliseconds you recover are real system gains, measurable and reproducible. Then come back in 8 weeks to track the skill improvement that separates you from your baseline.

Try It on BrainRivals

Reading about the concept is useful, but a repeatable score is more actionable. Run the Reaction Time test, save your result, then repeat under similar conditions later. The trend matters more than a single best attempt.