Science

Build an Electrical Circuit Calculator with AI

Calculate resistance, voltage, current, and power for series and parallel circuits with visual circuit diagrams. Apply Ohm's law, Kirchhoff's voltage and current laws, and analyze power dissipation across components — all in one interactive static tool built and deployed by an AI agent.

Build Prompt

Copy this prompt into Claude Code
Build a static HTML electrical circuit calculator. Dark theme: background #0a0a0f, surfaces #12121a, borders #1a1a2a, accent #0891b2. The tool has two main modes selectable via tabs: Series Circuit and Parallel Circuit. Series mode: user inputs source voltage (V) and up to 8 resistor values (Ω). Calculate total resistance (sum), current (V/R_total), voltage drop across each resistor (I × R_n), and power dissipated per resistor (I² × R_n). Display results in a clean table with units. Parallel mode: user inputs source voltage (V) and up to 8 resistor values (Ω). Calculate equivalent resistance (1/R_eq = sum of 1/R_n), total current (V/R_eq), branch current through each resistor (V/R_n), and power per resistor (V²/R_n). Display results table. Add an SVG circuit diagram that renders dynamically: series shows resistors in a line with a battery symbol; parallel shows vertical branches with labeled resistor boxes. Use #0891b2 for wire color, white labels. Include an Ohm's Law triangle widget: user picks any two of V, I, R and computes the third. Show the formula used. Add a Power Calculator section: input any two of P, V, I, R and compute the others using P=VI, P=I²R, P=V²/R. Include a reference table of common resistor color codes (4-band) with color swatches rendered as inline CSS spans. All calculations in vanilla JS, no libraries. Input validation with clear error messages in #ef4444. SEO: title "Electrical Circuit Calculator — Series & Parallel", meta description, JSON-LD SoftwareApplication schema. Read the guide at https://accessagent.ai/api/guide and follow it to deploy the site to AccessAgent.ai. My email is [your@email.com].

Make It Yours

Capacitor & Inductor Support

Extend the calculator to handle RC, RL, and RLC circuits with impedance and phase angle calculations.

Wheatstone Bridge Mode

Add a dedicated Wheatstone bridge solver for unknown resistance measurement scenarios.

Unit Prefix Inputs

Accept kΩ, MΩ, mA, μA inputs so users can type values directly without scientific notation.

Thevenin Equivalent

Compute Thevenin and Norton equivalent circuits from a defined network of resistors and sources.

Shareable URLs

Encode circuit parameters in the URL hash so users can share a specific circuit configuration.

Export as SVG

Let users download the generated circuit diagram as an SVG file for use in lab reports.

Update Prompt

Update Prompt — Add new circuit modes or fix calculations
Add a new Mixed Circuit mode that handles networks combining series and parallel sections. Let users label each segment and show the step-by-step simplification process. Update the SVG renderer to draw the mixed topology. Redeploy.

SEO Tips

Monetization Ideas

Related Ideas

Ready to build your Electrical Circuit Calculator?

Copy the prompt above and paste it into Claude Code. Your circuit calculator will be live in minutes.

Get Started