Home / Science / Ecology and organisms / Neuroscience / Hodgkin-Huxley simulatorTool #347

Hodgkin-Huxley model simulator: action potentials, gating variables m, h, n, threshold and f-I curve

Run the Hodgkin-Huxley (1952) squid giant axon model in your browser. Inject a current step or a pulse train and watch the membrane potential and the m, h and n gates; change the temperature or block Na⁺ and K⁺ channels; find the threshold of a single pulse and draw the firing rate against current (f-I curve). For study and teaching, not for clinical use.

Keep it one tap away for everyday use.

Bookmark Hodgkin-Huxley simulator?

Press Ctrl + D now. Your browser opens its own bookmark box, where you choose the name and folder.

  1. Stimulus
  2. Integrate
  3. Spikes
  4. f–I curve
Nothing is uploadedWorks offline once open

Current clamp

Conductances (block channels)

Set g̅Na to 0 to mimic tetrodotoxin (no spikes), or g̅K to 0 to mimic TEA (the axon cannot repolarise properly).

The 1952 squid giant axon model at 6.3 °C, with rest at −65 mV. Rates speed up by 3 for every 10 °C (Q₁₀ = 3). A spike is counted when V rises through 0 mV. For study and teaching, not for clinical use.

Result

Threshold and f–I curve

Threshold: the smallest current in one pulse of this width that fires a spike (found by halving the interval 30 times). f–I: the firing rate during a 500 ms step, counting spikes after the first 100 ms, at evenly spaced currents. Uses the temperature and conductances above.

Download

What it does

In 1952 Alan Hodgkin and Andrew Huxley described how a nerve impulse is made, from voltage-clamp recordings in the squid giant axon. Their model has four equations: one for the membrane voltage V, and three for “gates” that open and close with voltage:

  • m, the fast activation of the sodium channel (three per channel, so m³);
  • h, the slower inactivation that shuts sodium channels after they open;
  • n, the slow activation of the potassium channel (n⁴).

This simulator solves those equations step by step (fourth-order Runge-Kutta, 0.01 ms steps) while you inject current, as in a current-clamp experiment.

For study and teaching, not for clinical use.

How to use it

  1. Stimulus. A step holds a current for a while; a pulse train gives short pulses at a set frequency. Amplitudes are in µA/cm² of membrane.
  2. Simulate for sets the length of the run (up to 1000 ms).
  3. Temperature. The model was fitted at 6.3 °C. Warmer runs speed every gate by 3 for each 10 °C (Q₁₀ = 3), giving narrower spikes and faster firing.
  4. Conductances (folded away) let you block channels: g̅Na = 0 is like tetrodotoxin, g̅K = 0 is like TEA.
  5. Find threshold searches for the smallest single pulse that fires a spike. Draw f–I curve runs 500 ms steps at evenly spaced currents and plots the firing rate.

The plots show V, the three gates and the injected current. Download the traces as CSV, or the report as an image, PDF or Word file.

Worked example

The default run is a 10 µA/cm² step from 5 to 45 ms at 6.3 °C.

  • The page shows 3 spikes, first at 6.901 ms, peak 40.3 mV, then at 21.82 and 36.47 ms.
  • The firing rate is 67.6 Hz (mean interval 14.8 ms).
  • At 16.3 °C the same step gives 7 spikes, 6.17 ms apart.
  • The threshold of a 1 ms pulse is 6.911 µA/cm².
  • On the f–I curve, 10 µA/cm² fires at 70 Hz and 20 µA/cm² at 87.5 Hz (spikes counted from 100 to 500 ms).

Things to try

  • Refractory period: a pulse train at 200 Hz; some pulses fail because h has not recovered.
  • Anode break: a step of −10 µA/cm²; a spike fires about 6 ms after it ends.
  • Repetitive firing: the f–I curve jumps from zero to about 50 Hz, the classic type II behaviour of this model.

FAQ

Why is rest −65 mV and not 0? Hodgkin and Huxley measured voltage from rest with the opposite sign. This page uses the modern convention, shifted so rest is −65 mV.

Does anything leave my device? No. Everything is worked out in your browser.

Where the numbers come from

  • A. L. Hodgkin and A. F. Huxley (1952), J. Physiol. 117: 500-544: the model, its rate equations and constants (g̅Na 120, g̅K 36, g̅L 0.3 mS/cm²; Cm 1 µF/cm²), written in the modern convention with rest at −65 mV (E_Na +50, E_K −77, E_L −54.387 mV). Equations only.
  • Checked in the tests against SciPy solve_ivp (DOP853, relative tolerance 10⁻¹⁰) on the same equations: spike times agree within 0.1 µs, threshold and firing rates match.

Standard scientific values, such as constants, atomic weights and melting points, are facts found in every textbook; we name where ours were checked. If you are an author or publisher and want a value, a credit or a table changed or removed, tell us and we will act quickly.

Last updated 2026-11-09.

Related tools

Nernst and cell potential calculator #96 Electrode potentials at any concentration, pH and temperature by the Nernst equation, and full galvanic cells: E°cell, Ecell, the balanced cell reaction, cell notation, ΔG, K and Q. Pick from 44 standard half-reactions or type your own, and convert potentials between SHE, SCE, Ag/AgCl and RHE. Reaction kinetics fitter #81 Paste concentration against time to find the reaction order, the rate constant with its uncertainty and the half-life; paste k at several temperatures for the activation energy, A, ΔH‡ and ΔS‡. Publication plot maker #27 Paste columns or open a CSV or Excel file and get a clean scientific figure with error bars, sized for a journal column. Download vector SVG or PDF, or PNG at 300 or 600 dpi. Your data stays in your browser. Membrane potential calculator #345 Equilibrium (Nernst) potentials for K⁺, Na⁺, Cl⁻ and Ca²⁺ and the resting membrane potential from the Goldman-Hodgkin-Katz equation, with editable concentrations, permeability ratios and temperature, driving forces and GHK current-voltage curves. For study and teaching, not for clinical use. Notch filter and PSD #346 Paste or open an EEG, LFP or patch-clamp trace (CSV, text, Excel or WAV) and remove 50 or 60 Hz mains hum and its harmonics with IIR notch filters run forwards and backwards. See the Welch power spectrum before and after, band powers (delta to gamma or your own bands), and download the filtered trace as CSV. Spike train analyser #348 Paste spike times for one or more trials or cells and get the firing rate, inter-spike interval histogram, coefficient of variation, Fano factor, a peri-stimulus time histogram, a raster plot and an autocorrelogram, with CSV and report downloads. Runs in your browser.