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 with a series resistor and a shunt resistor to ground, tapping the output at the midpoint node we will call . Follow these steps exactly.
- 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.
- 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.
- Place R2. Add a second resistor below the right end of , oriented vertically so its bottom terminal can reach ground.
- 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.
- Wire it together. Click the source's top terminal and drag to the left terminal of . Click the right terminal of and drag to the top of ; this junction is the node. Finally wire the bottom of , 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 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 (current gain), (Early voltage), and a bias current . A MOSFET takes the transconductance and output resistance , or equivalently , the overdrive , and the channel-length modulation parameter .
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, , so the KCL equation at that node is:
Solving that single equation gives the closed-form result you expect from the voltage divider derivation:
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 , the divider loop reads:
MNA matrix section
The full system , where holds the conductances, is the vector of unknown node voltages and source branch currents, and 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 -domain. Replace with a capacitor and the divider becomes a first-order low-pass with:
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
1Kwith a capital K or adding a stray space such as1 kmay 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 or a zero bias current yields math that is valid but meaningless. Enter realistic operating-point values.
Quick Reference
| Action | How | Result |
|---|---|---|
| Place component | Click palette, click canvas | Snaps to grid |
| Rotate | Select, press R | 90° step |
| Edit value | Double-click component | Symbolic or numeric |
| Analyze | Ctrl+Enter | KVL/KCL/MNA/H(s) |
| Copy LaTeX | Copy button by equation | Clipboard string |
Related Tutorials
- Using LaTeX Circuit Equations for Homework — turn the copied output into a polished report.
- How to Read Circuit Schematics — understand the symbols before you draw them.
- Browse the full tutorial library.