Interactive Computational Neuroscience

The Hodgkin–Huxley
Neuron Model

A fully interactive simulation of the landmark 1952 model describing how action potentials are initiated and propagated in neurons — built on the Nobel Prize-winning quantitative framework for membrane ionic currents.

RK4 Simulation Real-Time Plotting Adjustable Parameters Gate Kinetics Phase Plane Temperature Scaling
1952
Original Publication
1963
Nobel Prize
4
Coupled ODEs
dt = 0.01 ms
RK4 Integration
§ 1

The Discovery: Squid Axons and the Action Potential

Alan Lloyd Hodgkin, 1963
Alan L. Hodgkin
1914 – 1998
Andrew Fielding Huxley, 1963
Andrew F. Huxley
1917 – 2012

Working at the Marine Biological Association laboratory in Plymouth, England between 1947 and 1952, Alan Lloyd Hodgkin and Andrew Fielding Huxley performed a series of elegant voltage-clamp experiments on the Loligo forbesi giant squid axon. This particular axon — 0.5–0.8 mm in diameter — was large enough to insert a wire electrode directly into its interior, making it the ideal preparation for measuring membrane currents with then-unprecedented precision. Their findings, published across five landmark papers in the Journal of Physiology in 1952, constituted the first complete quantitative description of the ionic mechanisms underlying the action potential.[1]

Loligo forbesi — European longfin squid
Loligo forbesi — the longfin inshore squid. Its giant axon (≈0.5 mm diameter) was the key preparation used by H&H.
© Hans Hillewaert / CC BY-SA 4.0

The core insight of Hodgkin and Huxley was that the action potential — the brief, stereotyped electrical impulse by which neurons communicate — arises from the coordinated, voltage-dependent opening and closing of ion-selective channels in the cell membrane. By holding the membrane potential at fixed values (voltage clamp) and measuring the resulting ionic currents, they could isolate and characterize separate sodium (Na⁺) and potassium (K⁺) conductances as functions of both voltage and time.

Their mathematical model, derived entirely from experimental data, was able to predict action potential shape, conduction velocity, refractory period, and threshold — phenomena that had been observed but never explained from first principles. For this work, Hodgkin and Huxley (together with Sir John Eccles for his work on synaptic transmission) received the Nobel Prize in Physiology or Medicine in 1963.[2]

Historical Context
The squid giant axon is part of the squid's escape reflex — it must conduct signals rapidly enough to coordinate jet propulsion. Its large diameter (up to 1 mm, compared to ~1 µm in human neurons) reduces axial resistance and increases conduction velocity to ~25 m/s without myelin. This evolutionary accident gave neuroscience its most tractable preparation for nearly five decades.
§ 2

The Equivalent Circuit Model

The Hodgkin–Huxley model represents a small patch of excitable membrane as an electrical circuit. The lipid bilayer acts as a capacitor (Cm), storing charge across its ~7 nm thickness. Embedded ion channels are modeled as variable conductances (gNa, gK) in series with batteries representing the Nernst equilibrium potentials (ENa, EK). A leak conductance (gL) captures the passive background permeability — primarily Cl⁻ and small K⁺ leakage — which stabilizes the resting potential.

Out In I ext C m 1 µF/cm² + Na · m³h ENa +50 mV + K · n⁴ EK −77 mV gL EL −54.4 mV Vm Na⁺ channel K⁺ channel Leak Capacitor (Cm) Current source (Iext)
Figure 1. Hodgkin–Huxley equivalent circuit (Vrest = −65 mV absolute scale). The dashed arrows on gNa and gK indicate voltage-dependent (variable) conductances. The battery polarity follows the convention that ENa drives inward current (depolarizing) while EK drives outward current (repolarizing).
§ 3

Mathematical Formulation

Applying Kirchhoff's current law to the equivalent circuit gives the membrane voltage ODE. The total membrane current must equal the external applied current:

Membrane: Cm · dV/dt = Iext − INa − IK − IL voltage ODE
INa = Na · m³ · h · (V − ENa) sodium current
IK = K · n⁴ · (V − EK) potassium current
IL = L · (V − EL) leak (passive)

The gating variables m, h, and n each obey a first-order kinetic equation. They represent the probability that individual gating particles (subunits) are in the permissive (open) state. Each evolves toward its voltage-dependent steady state x(V) with time constant τx(V):

dm/dt = αm(V)·(1−m) − βm(V)·m = [m(V)−m] / τm(V)
dh/dt = αh(V)·(1−h) − βh(V)·h = [h(V)−h] / τh(V)
dn/dt = αn(V)·(1−n) − βn(V)·n = [n(V)−n] / τn(V)
x(V) = αx / (αx + βx) steady-state
τx(V) = 1 / (αx + βx) time constant (ms at 6.3°C)

The voltage-dependent rate functions (transition rates between closed and open states, in ms−1) were determined empirically by Hodgkin and Huxley from fits to their voltage-clamp data. They use the original H&H convention where V = 0 at rest (= −65 mV absolute); threshold ≈ V+15 mV, AP peak ≈ V+100 mV.

αm =−0.1(V−25) / (e−(V−25)/10−1)→ 1.0 as V → 25 (L'Hôpital)
βm =4·e−V/18
αh =0.07·e−V/20
βh =1 / (e−(V−30)/10+1)
αn =−0.01(V−10) / (e−(V−10)/10−1)→ 0.1 as V → 10 (L'Hôpital)
βn =0.125·e−V/80
φ(T) =3(T−6.3)/10Q10=3 temperature scaling (all rates × φ)
In the equations V=0 at rest (−65 mV absolute). Simulator initial conditions: Vm(0)=−65 mV, m(0)=n(0)=h(0)=0. At T=6.3°C (squid axon experiment); at body temperature (37°C), φ≈28× faster.[3,4]

The choice of m³h for Na⁺ and n⁴ for K⁺ was motivated by the shapes of the conductance time courses observed experimentally: the sigmoidal activation delay of gNa required at least three independent activation gates, while the delayed rectifier K⁺ conductance required four. This was later validated by single-channel recordings showing that Na⁺ channels have three independent activation subunits (S4 voltage sensors) and one inactivation gate, while K⁺ channels are homotetrameric.[5]

Physical Interpretation of the Gates
m (Na⁺ activation): opens fast upon depolarization. At rest (V=0): m(0)=0, m→0 (closed). During AP peak (~115 mV): m→1.
h (Na⁺ inactivation): inactivation gate. At V=0: h(0)=0; the system builds up as it depolarizes. During AP: h→0, blocking further Na⁺ entry (absolute refractory period).
n (K⁺ activation): delayed rectifier. At V=0: n(0)=0 (closed). Opens during depolarization, driving repolarization.
Hodgkin-Huxley model voltage clamp results
Calculated (upper) vs. measured (lower) action potentials from the 1952 paper — the model's remarkable predictive accuracy. Reproduced from Hodgkin & Huxley (1952), J. Physiol. 117, 500–544. Public domain.

Standard Parameter Values

ParameterValueUnitsPhysical Meaning
Na120mS/cm²Max Na⁺ conductance
K36mS/cm²Max K⁺ conductance
L0.3mS/cm²Passive leak conductance
ENa+50mVNa⁺ Nernst (equilibrium) potential
EK−77mVK⁺ Nernst (equilibrium) potential
EL−54.4mVLeak reversal potential
Cm1µF/cm²Membrane capacitance
Vrest−65mVResting membrane potential (absolute scale)
T6.3°CTemperature of original H&H experiments
§ 4

Interactive Simulator

Adjust the parameters and stimulus below to explore action potential generation. Try injecting a sub-threshold current (below ~6 µA/cm²) to see the membrane return to rest without firing, or a supra-threshold step to trigger an action potential. Block Na⁺ (simulates tetrodotoxin, TTX) or K⁺ (simulates tetraethylammonium, TEA) channels to see how each contributes to AP shape.

Hodgkin–Huxley Membrane Patch
4th-order Runge–Kutta · dt = 0.01 ms · Squid giant axon parameters
Ready
▶ Current Clamp
⚡ Voltage Clamp
Stimulus · Iext(t)
Type
IextµA/cm²
Startms
Durationms
FreqHz
Max Conductances
NamS/cm²
KmS/cm²
LmS/cm²
Reversal Potentials
ENamV
EKmV
ELmV
Physical Parameters
Temp°C
CmµF/cm²
dtms
Windowms
Playback Speed
Speed
Lower = slower, easier to read AP shape
Ion Channel Blockers
Quick Presets
Membrane Potential (mV)
Vm
Iext
Gating Variables
m
h
n
Ionic Currents (µA/cm²)
INa
IK
IL
Stimulus Current Iext(t) (µA/cm²)
Iext
Clamp Protocol
VholdmV
VcmdmV
Step onsetms
Step durms
Conductances
NamS/cm²
KmS/cm²
LmS/cm²
Reversals
ENamV
EKmV
ELmV
Ion Channel Blockers
Temperature
T°C
Voltage Sweep — auto-runs clamp across a range of Vcmd
Vcmd from to step mV
I–V Curve Data — each Run Clamp adds one row
Vcmd(mV)INa pkIK pkItot pk
Run clamp at different Vcmd to build I–V curve
V(t) — Clamped VoltagePre-hold (gray) → Step to Vcmd (red line = step onset)
I(t) — Ionic CurrentsClamped currents over time
Gating VariablesAt clamped voltage
I–V Relationship Accumulated peak currents vs Vcmd
0
Spikes
Peak V (mV)
Firing rate (Hz)
0
Sim time (ms)
1.0×
φ (temp scale)
Try This
Threshold: Gradually increase Iext from 0 — you'll see damped oscillations below ~6.5 µA/cm², then a full AP above.  |  Temperature: Set T=37°C — the AP narrows dramatically (φ≈28×).  |  TTX: Check "Block Na⁺" — no AP fires.  |  TEA: Check "Block K⁺" — AP prolongs, no AHP.
§ 5

Gate Kinetics Explorer

These curves — derived analytically from the rate functions — show how the steady-state activation/inactivation and time constants of each gate depend on membrane voltage. The vertical dashed line tracks the current simulated membrane potential. Notice how m (Na⁺ activation) shifts right of h (Na⁺ inactivation): depolarization quickly opens m before h shuts, creating the brief window of Na⁺ permeability that drives the action potential upstroke.

Steady-State Gating (x) vs membrane potential
Time Constants (τx) at current temperature
§ 6

Phase Portrait: V–n Plane

The phase plane projects the high-dimensional state of the neuron onto two dimensions. Plotting the membrane potential V against the K⁺ activation variable n reveals the limit cycle — the closed trajectory traced by a periodically firing neuron. During rest, the system sits at a stable fixed point (lower left). A sufficiently large perturbation kicks the system onto the unstable spiral, which falls onto the limit cycle. The system then returns to the fixed point after one AP (if sub-threshold) or continues to orbit (if tonically firing).[3]

V vs n Phase Portrait — trajectory trails last 200 ms
§ 7

References

Implementation notes: This simulation implements the standard Hodgkin–Huxley model using 4th-order Runge–Kutta integration (dt = 0.01 ms) for numerical stability. Parameter values: ḡNa=120, ḡK=36, ḡL=0.3 mS/cm²; ENa=+50, EK=−77, EL=−54.4 mV; Cm=1 µF/cm²; T=6.3°C. Uses modern absolute-voltage convention (Vrest=−65 mV), equivalent to original H&H (1952) values. Temperature scaling uses Q10 = 3 as reported experimentally.[1,4] Built with vanilla JavaScript and the HTML5 Canvas API — no external libraries.
⚙ Display Settings
Color Mode
Dark Mode
Font Size
Font Style