Building an antenna calculator for HF wire antennas
How I built an HF antenna length calculator with SVG diagrams, multiband harmonic analysis, and 50 ohm SWR — covering dipoles, end-fed half-waves, and quarter-wave verticals.
Every amateur radio operator has done this calculation on the back of an envelope. 468 divided by frequency, halve it for each leg, cut the wire a bit long, trim to tune. It’s not complicated maths, but I wanted a tool that did it cleanly and showed the full picture — dimensions, feed impedance, SWR against 50 ohm coax, and which other bands the antenna covers via harmonics.
The formulas
Wire antenna length calculations come down to a few well-known formulas. A half-wave dipole in feet is 468 × VF / f(MHz), where VF is the velocity factor of the wire — typically 0.95 for bare copper. A quarter-wave vertical is half that: 234 × VF / f(MHz). An end-fed half-wave is the same length as a dipole, just fed differently.
The constant 468 comes from the speed of light (983.6 feet per microsecond), divided by two for a half wavelength, with a roughly 5% shortening factor baked in. That shortening accounts for end effects — the current distribution on a real wire doesn’t behave exactly like a theoretical infinitely thin conductor. It’s an approximation, but it’s the standard one used across the hobby and it gets you close enough that trimming handles the rest.
The velocity factor slider lets you adjust for wire type. Bare copper sits around 0.95. Insulated wire is lower — the insulation slows the wave slightly, so the antenna needs to be shorter. Thicker wire also shifts it down a fraction.
Three antenna types
I started with three types that cover most HF wire antenna situations.
Half-wave dipole. Two equal legs fed at the centre. Feed impedance around 73 ohms, which gives a 1.46:1 SWR into 50 ohm coax — perfectly acceptable for most rigs. Dipoles resonate on odd harmonics. A 40m dipole also works on 15m (third harmonic) because the current distribution at odd multiples still presents a reasonable impedance at the centre feed point.
End-fed half-wave. Same physical length as a dipole, but the entire wire runs in one direction with a 49:1 UNUN transformer at the feed end. The transformer matches the high impedance (~2500 ohms) at the wire’s end down to ~50 ohms for the coax. The real advantage is harmonic coverage — an EFHW resonates on all harmonics, not just odd ones. A 40m EFHW covers 40m, 20m, 15m, and 10m. That’s four bands from one wire, which is why they’ve become so popular.
Quarter-wave vertical. A single vertical element with ground radials at the base. Half the length of a dipole, feed impedance around 36 ohms (1.39:1 SWR into 50 ohm coax). It’s a single-band antenna — the feed impedance changes too drastically on harmonics to be useful without a tuner.
The harmonic analysis
This is the part I wanted most. When you select an antenna type and frequency, the calculator checks every harmonic of that frequency and highlights which ones fall within amateur HF band allocations. For a dipole, it checks odd harmonics only. For an EFHW, it checks all of them.
The logic is simple — multiply the fundamental frequency by each harmonic number and check if it falls between a band’s lower and upper edges. No tolerance or fudge factor. If the harmonic lands inside the band, it’s highlighted. The band grid shows both the fundamental (filled) and each harmonic (outlined) with labels like “3rd harm.” so you can see exactly what you’re getting.
SVG diagrams
Each antenna type has a schematic diagram drawn as inline SVG. The dipole shows the two legs with a centre feed gap, feedline stub, and insulators at each end. The EFHW shows the UNUN box at the feed end with the wire running to an insulator at the far end. The vertical shows the radiator going up with ground radials fanning out below.
Dimension arrows update with the calculated lengths whenever you change the frequency, velocity factor, or units. The diagrams aren’t decorative — they show the feed point, impedance, and SWR against 50 ohm coax so you can see the full picture at a glance.
The SVG is rebuilt on every input change by setting innerHTML on a fixed viewBox element. No animation library, no canvas — just template literals building SVG strings. It scales cleanly on mobile because the viewBox handles the responsive sizing.
The worked examples
At the bottom of the page, the formula section shows the maths for the selected antenna type with a worked example using your current settings. I added this because I’ve always found it useful to see the actual numbers substituted in — it builds confidence that the tool is doing what you expect, and it’s a quick reference if you want to do the calculation yourself with different values.
Try it
The calculator is live at skipzone.co.uk/tools/antenna-calculator. Pick an antenna type, select a band or enter a frequency, and see what you need. If you’re planning a multiband wire antenna, try the EFHW on 40m and look at the band grid — four bands from one piece of wire is hard to argue with.
73 de MM7IUY