Advanced maths

Graph resistance distance calculator with weighted edges

Find exact effective resistance between two graph vertices using positive conductance weights, with Kirchhoff-current and energy certificates.

Your numbers

Use at most 100 undirected nonloop edges. Conductances are positive fractions or decimals with at most six places, bounded by 10⁶. Edge resistance equals 1/conductance; parallel rows add conductance.

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Behind the numbers

How this calculation works

Effective resistance measures how all available paths share current in an ideal linear resistor network. This page takes conductance as the edge weight, forms the grounded Laplacian and solves the unit-current Kirchhoff equations with exact rational arithmetic. The resulting voltage difference is the effective resistance. Edge currents and potentials are retained, and the result is checked both by current conservation and by equality with dissipated unit-current energy.

THE FORMULAL*V=e_source−e_target with the target grounded; R_eff=V_source−V_target for one unit of injected current, and energy Σ I_e²/c_e=R_eff.

A worked example

In a triangle with each edge conductance one, every individual resistance is one. Between vertices one and three, the direct one-ohm edge is parallel to the two-ohm path through vertex two, giving resistance 2/3. With vertex three grounded and one unit injected at vertex one, potentials are V1=2/3, V2=1/3 and V3=0. The direct current is 2/3 and each edge on the two-step branch carries 1/3.

Good to know

Supports 1–20 vertices and at most 100 nonloop undirected edge rows. Conductances are positive rational numbers at most 10⁶, with shared exact-arithmetic growth limits. Parallel rows add through the Laplacian. Disconnected query endpoints give infinite resistance; unrelated components do not affect a connected pair and receive no arbitrary potentials. Identical query endpoints give zero. Negative, nonlinear, time-varying or reactive circuit elements are outside this static graph model.

Conductance adds in parallel while resistance does not

The input row weight c means conductance, so an edge with c=2 has resistance one half. Two parallel edges of conductance two and three have total conductance five and effective resistance one fifth. Entering two and three while intending them as resistances would describe another network. The field labels and output table retain this distinction rather than using the ambiguous word weight without a physical interpretation.

For the default triangle, the grounded equations are 2V1−V2=1 and 2V2−V1=0. Their exact solution gives the stated potentials and branch currents. Current orientation in the table follows each entered endpoint order; a negative value means the actual current runs opposite that orientation. It does not mean the positive conductance became negative or that the graph edge turned into a one-way diode.

The unit-conductance triangle splits a one-unit current between two paths1231/31/32/3c = 1 on eachInject 1 unitR_eff = 2/3Arrows indicate current, not one-way edges
All three edges have conductance one. Potentials are V1=2/3,V2=1/3,V3=0. The direct edge carries 2/3 and both edges of the two-step branch carry 1/3, giving effective resistance 2/3.

The Graph radius diameter and center calculator from an adjacency matrix uses shortest-path distance, which does not capture current sharing across parallel network routes.

A unit-current energy identity checks the whole solved network

After solving, the implementation checks net current of +1 at the source, −1 at the target and zero at every other solved vertex. It separately sums I²/c on every edge and compares the exact energy with the returned resistance. In the triangle that is 4/9+1/9+1/9=2/3. These certificates examine both the local current balances and the global energy result, rather than relying solely on one voltage difference from a matrix solver.

If the target is outside the source component, no finite unit-current solution joins the pair and the resistance is infinite. Other disconnected components are irrelevant to a query inside one connected component, so their potentials remain unassigned rather than chosen by an arbitrary grounding. A source equal to the target instead uses the zero-current convention and returns zero resistance. This ideal graph model omits contact effects, component tolerances and frequency-dependent impedances; the exact fractions describe the entered mathematical network, not a measurement guarantee.

A few questions, answered

Can I enter resistances instead of conductances?

Convert every positive resistance r to conductance 1/r before entering it. The form does not infer which interpretation was intended from the size of the number.

Why can current be negative in an edge row?

The endpoint order gives a reference orientation. A negative signed current simply flows in the opposite direction; the underlying resistor remains undirected with positive conductance.

Find your calculator

Start typing to explore the library.