Antenna Modeling With Free Software: EZNEC and 4NEC2 for Practical Hams

How to model ham radio antennas with EZNEC and 4NEC2 software. Setting up your first model, interpreting results, ground effects, and validating designs before building.

· 7 min read · By HamPost Editorial Team

Part of our guide: Quad Antennas vs Yagis: Performance, Complexity, and Which to Build

Antenna modeling software lets you design, test, and optimize antennas on your computer before cutting a single piece of wire. You can answer questions like: "How high does my dipole need to be for low-angle DX radiation?" or "What happens if I add a reflector 0.2λ behind my vertical?" — all without climbing a tower or buying materials.

The underlying engine for most ham antenna modeling is NEC2 (Numerical Electromagnetics Code), a method-of-moments electromagnetic simulation originally developed by Lawrence Livermore National Laboratory. Two free programs make NEC2 accessible to hams: EZNEC (demo version) and 4NEC2.

Understanding What Models Tell You

Antenna modeling software calculates:

Radiation pattern: Where your antenna concentrates energy. Shown as a 3D or 2D plot. Tells you what elevation angles and compass directions get the most signal.

Gain: Maximum signal strength in the favored direction, expressed in dBi (over isotropic) or dBd (over dipole). Higher gain means more concentrated radiation.

Feedpoint impedance: The complex impedance (R + jX) at the feedpoint. This tells you whether the antenna matches 50 ohms and what matching network you might need.

SWR bandwidth: How the SWR varies across a frequency range. Shows how much bandwidth your antenna covers before SWR exceeds your threshold.

Current distribution: How current flows on the antenna elements. Helps you understand why the antenna radiates the way it does.

EZNEC: The Ham Standard

Roy Lewallen (W7EL) created EZNEC specifically for ham radio use. The demo version (EZNEC-DEMO) is free and handles up to 20 segments — enough for simple antennas.

Strengths:

  • Designed for hams by a ham
  • Intuitive wire entry (coordinates in feet or meters)
  • Clear radiation pattern display
  • SWR sweep with familiar graph
  • Excellent documentation with practical examples
  • ARRL antenna book models available as EZNEC files

Limitations of free version:

  • 20 segment maximum (limits complex designs)
  • No optimization routines
  • Windows only

Full version (EZNEC+): Paid, removes segment limit, adds optimization and other features. $89. Worth it if you do significant antenna design work.

Setting Up Your First EZNEC Model (Half-Wave Dipole)

  1. Define wires: A half-wave dipole for 20m is a single wire, about 33 feet (10.06m) total length. Enter as one wire from (-5.03, 0, 10) to (5.03, 0, 10) — meaning 5.03m each side of center, at 10m height.

  2. Set frequency: 14.150 MHz (center of 20m phone band)

  3. Define ground: Choose "Real/MININEC" for approximate ground, or "Real/High Accuracy" (NEC ground) for better accuracy. Set ground constants (average ground: conductivity 0.005 S/m, dielectric constant 13).

  4. Set source: Place a voltage source at the center of the wire (middle segment)

  5. Run: Click calculate. EZNEC computes radiation pattern, gain, feedpoint impedance.

  6. View results:

    • Feedpoint Z: approximately 72 + j0 ohms (resonant half-wave dipole)
    • Gain: approximately 7.5 dBi at 10m height over average ground
    • Pattern: figure-8 broadside to the wire, with specific elevation characteristics dependent on height

Interpreting Radiation Patterns

The pattern display shows:

  • Azimuth pattern: Top-down view. Which compass directions get signal.
  • Elevation pattern: Side view. What takeoff angles are favored.

For DX (long-distance) HF work, you want low elevation angles (5-20°). For regional contacts (NVIS), you want high angles (60-90°). The antenna height in wavelengths determines this.

Rule of thumb for a horizontal antenna:

  • Height = 1/4λ: Maximum radiation straight up (NVIS, good for regional)
  • Height = 1/2λ: Balanced low and high angles
  • Height = 1λ: Strong low-angle lobe (good for DX)
  • Height = 2λ: Very low angle, multiple lobes

4NEC2 by Arie Voors is a complete NEC2 implementation for Windows. Fully free, no segment limits, includes optimization.

Strengths:

  • No segment limits (model complex Yagis, stacked arrays, anything)
  • Built-in optimizer (automatically adjust dimensions for target SWR, gain, etc.)
  • 3D geometry viewer with current animation
  • Supports NEC4 engine if you have the code
  • Imports/exports various file formats
  • Completely free

Weaknesses:

  • Interface is less intuitive than EZNEC (steeper learning curve)
  • Documentation is thinner
  • Can be overwhelming for beginners

Getting Started With 4NEC2

  1. Download from www.qsl.net/4nec2
  2. Install and open
  3. The geometry editor lets you define wires by coordinates
  4. Alternatively, use the built-in templates (dipole, Yagi, vertical) as starting points
  5. Set frequency, ground type, and source
  6. Calculate and view patterns

The learning curve is steeper than EZNEC, but once comfortable, you can model anything — large Yagi arrays, phased verticals, loops, multi-element beams, stacked antennas.

Modeling Ground Effects

Ground modeling dramatically affects results for HF antennas (which are typically within a few wavelengths of ground):

Perfect ground: Theoretical, shows maximum possible gain. Useful for comparing antenna designs but unrealistic.

Real ground (NEC ground model): Models reflection from finite-conductivity ground. Shows how ground characteristics affect pattern and gain. Use this for realistic results.

Ground constants:

  • Very good (saltwater): σ = 5 S/m, ε = 80
  • Good (farmland, rich soil): σ = 0.03 S/m, ε = 20
  • Average (suburban): σ = 0.005 S/m, ε = 13
  • Poor (city, rocky, sandy): σ = 0.001 S/m, ε = 5
  • Very poor (mountain rock): σ = 0.0002 S/m, ε = 3

Your ground type matters. A vertical antenna over saltwater outperforms the same antenna over rocky ground by 6-10 dB. The model shows this.

Radials: For vertical antennas, you can model individual radials to see how radial quantity and length affect performance. The classic result: diminishing returns above 16-32 radials for a quarter-wave vertical.

Practical Modeling Projects

Project 1: Optimize Dipole Height

Model a 20m dipole at heights from 20 to 60 feet. Compare radiation patterns. See exactly where the low-angle lobe appears and how it changes with height. This tells you the minimum height for effective DX performance with YOUR specific antenna.

Project 2: Design a 2-Element Wire Yagi

Start with a driven element (half-wave dipole). Add a reflector 0.15-0.2λ behind it, slightly longer than the driven element. Optimize spacing and reflector length for maximum front-to-back ratio. The model gives you exact dimensions before you cut wire.

Project 3: Compare Vertical vs Dipole

Model a quarter-wave vertical with radials and a half-wave dipole at realistic heights over your actual ground type. Compare low-angle gain. This answers the eternal question: "Should I use a vertical or dipole for DX?" The answer depends on your specific situation — and modeling reveals it.

Project 4: Fan Dipole Interactions

A fan dipole has multiple dipole elements for different bands, sharing one feedpoint. Do they interact? Model it and find out. You'll see that some band combinations interact minimally while others detune each other significantly. The model shows which combinations work and how much detuning to expect.

Project 5: Evaluate Effect of Nearby Objects

Model your antenna with a metal tower, house gutters, or other nearby conductors represented as additional wires. See how these objects affect your pattern, gain, and feedpoint impedance. Many hams discover their pattern is significantly distorted by nearby metal structures.

Validating Models Against Reality

Models are simulations, not reality. Validate them:

Compare modeled SWR to measured SWR: If your NanoVNA shows resonance at 14.1 MHz and the model predicts 14.15 MHz, the model is close. Small discrepancies are normal (the model uses ideal wire conductors, your wire has velocity factor effects at insulators, etc.).

Compare modeled impedance to measured impedance: If the model says 72 + j5 ohms and you measure 68 + j8 ohms, excellent agreement. Large discrepancies indicate something the model isn't capturing (nearby objects, ground different from assumed, etc.).

Pattern validation is harder: You'd need a calibrated field strength measurement to verify radiation patterns. Most hams validate indirectly — if the model predicts strong low-angle radiation toward Europe, and you successfully work Europe, the model is probably right.

Common Modeling Mistakes

Too few segments: NEC2 requires adequate segmentation. Rule of thumb: minimum 10 segments per half-wavelength. Too few segments give inaccurate results.

Wire junctions not aligned: When wires connect, they must share exact coordinates at the junction point. A 0.001m gap causes errors.

Source on a short segment: The source segment should be similar length to other segments. Don't put a 1-inch source segment in the middle of 1-foot segments.

Ignoring the Average Gain Test (AGT): The AGT checks model quality. A perfect model has AGT = 1.000. Values between 0.95 and 1.05 are acceptable. Outside that range, the model has issues (insufficient segmentation, close wire spacing problems, etc.).

Modeling very thin wires at very close spacing: NEC2 struggles when wire spacing is less than several wire diameters. This affects modeling of folded dipoles and tightly-coupled elements. Use the extended thin-wire kernel if available.

Beyond Modeling: Optimization

4NEC2's optimizer automatically adjusts wire dimensions to achieve a target:

  • "Minimize SWR at 14.2 MHz" — optimizer adjusts wire length until SWR is minimum
  • "Maximize forward gain" — optimizer adjusts element spacing and length
  • "Maximum front-to-back ratio" — optimizer finds dimensions that push rear lobe down

You define what to optimize, set which dimensions the optimizer can change, and let it iterate. It explores thousands of combinations and finds the best design within your constraints.

This is enormously powerful for Yagi design — achieving a specific gain/bandwidth/F-B compromise that would take weeks of manual trial becomes a few minutes of computation.

Read next Antenna Modeling Software: EZNEC, MMANA-GAL, and 4NEC2 Compared Compare the three main antenna modeling programs used by hams. Which one fits your needs — EZNEC, MMANA-GAL, or 4NEC2? Real-world workflow for each.

Frequently asked questions

Which free antenna modeling program should a ham start with?
EZNEC's free demo is the friendlier entry point because Roy Lewallen wrote it for hams, with coordinate wire entry, clear pattern plots, and good documentation. Its 20-segment cap limits complex designs, so move to 4NEC2 when you need unlimited segments and an optimizer.
What does antenna modeling software actually calculate?
It gives you the radiation pattern in 2D or 3D, maximum gain in dBi or dBd, complex feedpoint impedance as R plus jX, SWR across a frequency sweep, and the current distribution along the elements that explains why the antenna radiates the way it does.
What takeoff angle should I aim for in my model?
For DX on HF you want the main lobe between about 5 and 20 degrees, while NVIS regional work wants 60 to 90 degrees. Height in wavelengths controls this, since a quarter wavelength radiates mostly upward and a full wavelength develops a strong low-angle lobe.
How do I know whether my model is trustworthy?
Compare modeled and measured values. If the model predicts resonance at 14.15 MHz and your NanoVNA reads 14.1 MHz, that is close. Impedance agreement like 72 plus j5 modeled versus 68 plus j8 measured is excellent. Large gaps mean something is missing, such as nearby metal.
What are the most common antenna modeling mistakes?
Too few segments, wire junctions that do not share exact coordinates so a 0.001 meter gap remains, a source segment much shorter than neighboring segments, skipping the Average Gain Test, and very thin wires spaced closer than several wire diameters.
What can an optimizer do for Yagi design?
You set a goal such as minimum SWR at 14.2 MHz, maximum forward gain, or best front-to-back ratio, choose which dimensions it may change, and 4NEC2 iterates through thousands of combinations. A gain and bandwidth compromise that would take weeks by hand resolves in minutes.

Put it into practice

Reader field notes — share yours

Log in to share your field notes and photos.