How to Use CircuitMath: Getting Started Guide

How to Use CircuitMath

CircuitMath is a free, browser-based tool that turns a drawn schematic into symbolically correct circuit equations. You draw the circuit with a drag-and-drop editor, set component values either symbolically or numerically, and click one button to get Kirchhoff's voltage law (KVL) loop equations, Kirchhoff's current law (KCL) node equations, the modified nodal analysis (MNA) matrix, and, for AC circuits, the transfer function. Every result is rendered with KaTeX and comes with a copy button that hands you clean LaTeX for your report. This guide walks through the whole process with one concrete circuit so you can follow along and reproduce it in the editor.

The Three Panels

When you open the editor you see three working areas. On the left is the component palette, a vertical list of everything you can place: resistors, capacitors, inductors, independent voltage and current sources, the four dependent sources, ground, wires, and the four transistor types. In the center is the canvas, a snap-to-grid drawing surface where the schematic lives. On the right is the results panel, which stays empty until you run an analysis and then fills with the equation sections described later. The layout is fixed, so the canvas does not scroll out from under you while you work.

A Worked Walkthrough: A Resistive Voltage Divider

Let us build a specific, named circuit from scratch: a divider driven by a source VinV_{in} with a series resistor R1R_1 and a shunt resistor R2R_2 to ground, tapping the output at the midpoint node we will call VoutV_{out}. Follow these steps exactly.

  1. Place the source. Click the voltage source in the palette, then click near the left edge of the canvas. A circle with a plus and minus terminal appears and snaps to the grid. Leave the bottom terminal near the bottom rail; that is where ground will go.
  2. Place R1. Click the resistor in the palette, then click near the top of the canvas, to the right of the source. If it lands horizontally and you want it that way, leave it; otherwise select it and press R to rotate it in 90-degree steps.
  3. Place R2. Add a second resistor below the right end of R1R_1, oriented vertically so its bottom terminal can reach ground.
  4. Place ground. Click the ground symbol and place it at the bottom rail. Every circuit needs exactly one ground node so the solver has a voltage reference.
  5. Wire it together. Click the source's top terminal and drag to the left terminal of R1R_1. Click the right terminal of R1R_1 and drag to the top of R2R_2; this junction is the VoutV_{out} node. Finally wire the bottom of R2R_2, the bottom of the source, and the ground symbol all to the bottom rail.

Take a moment to confirm the wires actually touch the terminals. A wire endpoint that stops one grid square short of a terminal looks connected but is not, and it is the single most common reason an analysis fails. Terminals that are joined show a solid junction dot.

Setting Values: Symbolic vs Numeric

Double-click a component (or select it and press Enter) to open the value editor. You have two choices for every passive element. A symbolic value such as R1 or R2 tells the solver to keep the element as a literal symbol, which produces a general formula you can reason about. A numeric value such as 1k for 1 kΩ or 100n for 100 nF substitutes the number and produces a specific answer. For our divider, set R1=R2R_1 = R_2 symbolically by naming them R1 and R2, and name the source Vin. The engineering suffixes follow the usual SPICE convention: k for kilo, m for milli, u for micro, n for nano, and p for pico.

For transistors the value editor instead asks for the operating-point parameters that define the small-signal model. A BJT takes β\beta (current gain), VAV_A (Early voltage), and a bias current ICI_C. A MOSFET takes the transconductance gmg_m and output resistance ror_o, or equivalently IDI_D, the overdrive VOVV_{OV}, and the channel-length modulation parameter λ\lambda.

Running the Analysis

With the divider complete, click Analyze or press Ctrl+Enter. Internally the tool validates the topology first: it checks that a ground exists, that the graph is connected, and that every component is supported. If a transistor is present it swaps in the small-signal equivalent and zeroes the DC sources before solving. It then converts the schematic to a netlist and runs modified nodal analysis symbolically. For our divider there is one unknown node voltage, VoutV_{out}, so the KCL equation at that node is:

VoutVinR1+VoutR2=0\frac{V_{out} - V_{in}}{R_1} + \frac{V_{out}}{R_2} = 0

Solving that single equation gives the closed-form result you expect from the voltage divider derivation:

Vout=VinR2R1+R2V_{out} = V_{in}\,\frac{R_2}{R_1 + R_2}

Reading the Results Panel

The output is split into labeled sections so you can grab exactly the piece you need.

KCL section

One equation per non-ground node expressing current balance. For the divider this is the single node equation above. Larger circuits list one equation per node.

KVL section

One equation per independent loop expressing the sum of voltage drops around a closed path. Driving a single series loop with II, the divider loop reads:

VinIR1IR2=0V_{in} - I R_1 - I R_2 = 0

MNA matrix section

The full system Gx=bG\mathbf{x} = \mathbf{b}, where GG holds the conductances, x\mathbf{x} is the vector of unknown node voltages and source branch currents, and b\mathbf{b} collects the source terms. This is the same system a SPICE engine assembles.

Transfer function section

For circuits with reactive elements, the ratio of output to input in the ss-domain. Replace R2R_2 with a capacitor and the divider becomes a first-order low-pass with:

H(s)=Vout(s)Vin(s)=11+sR1CH(s) = \frac{V_{out}(s)}{V_{in}(s)} = \frac{1}{1 + sR_1 C}

Small-signal section

For transistor circuits the panel also draws the linearized circuit it actually solved, so you can verify the substitution against your own hand analysis.

Copying LaTeX

Each equation has a copy button beside it. Clicking it places the raw LaTeX string on your clipboard. The string uses standard commands such as \frac, \cdot, and \begin{bmatrix} and renders identically in Overleaf, a local TeX install, or a KaTeX-enabled Markdown note. There is no proprietary markup to clean up.

Templates and Keyboard Shortcuts

If you would rather start from a known-good circuit, click Templates to load a prebuilt topology such as a voltage divider, Wheatstone bridge, common-emitter amplifier, common-source amplifier, cascode, or an RC low-pass filter, then edit values before analyzing. The shortcuts that save the most time are R to rotate, Delete to remove a selection, Ctrl+Z and Ctrl+Shift+Z to undo and redo, Ctrl+Enter to analyze, Escape to cancel a wire in progress, and G to toggle the grid.

Common Mistakes

  • Forgetting the ground node. Without a reference the MNA matrix is singular and the solver reports an error. Always place exactly one ground.
  • Near-miss wiring. A wire that stops one grid square short of a terminal leaves the node electrically open. Look for the junction dot before analyzing.
  • Mixing unit suffixes. Writing 1K with a capital K or adding a stray space such as 1 k may not parse. Use lowercase SPICE suffixes with no space.
  • Two grounds at different points. Placing two ground symbols on nodes that are not actually wired together creates an ambiguous reference. Keep a single ground node.
  • Unphysical transistor parameters. A negative gmg_m or a zero bias current yields math that is valid but meaningless. Enter realistic operating-point values.

Quick Reference

ActionHowResult
Place componentClick palette, click canvasSnaps to grid
RotateSelect, press R90° step
Edit valueDouble-click componentSymbolic or numeric
AnalyzeCtrl+EnterKVL/KCL/MNA/H(s)
Copy LaTeXCopy button by equationClipboard string

Related Tutorials

Related Tutorials

Practical Topics

Thevenin and Norton Equivalent Circuits

Find Thevenin and Norton equivalents step by step: open-circuit voltage, short-circuit current, and equivalent resistance.

Practical Topics

Dependent Sources in Circuit Analysis

Learn how VCVS, VCCS, CCVS, and CCCS dependent sources change nodal and mesh analysis, with worked examples.

Practical Topics

How to Read Circuit Schematics: A Beginner Guide

Learn to read schematic diagrams: component symbols, node connections, reference designators, and how to trace current paths.

Back to All Tutorials