# KiCost turns a KiCad bill of materials into a priced, interactive spreadsheet

> KiCost is a Python tool for circuit board designers that reads the bill of materials exported from KiCad, Altium, Proteus, Eagle, Upverter or a hand made CSV, scrapes price and stock data from distributor sites, and writes a spreadsheet where the board quantity and the per-distributor order quantities are live cells. It is MIT licensed and has a graphical interface alongside the command line.

**hildogjr/KiCost** — Build cost spreadsheet for a KiCad project.

- Repository: https://github.com/hildogjr/KiCost
- Stars: 628 · Forks: 100
- Language: Python
- License: MIT
- Published: 2026-10-22 · Updated: 2026-10-22 · Language: en
- Canonical page: https://hysenlabs.com/projects/hildogjr-kicost

## What the tool produces

KiCost is intended to be run as a script for generating part-cost spreadsheets for circuit boards developed with KiCad. KiCost also comes with a graphical user interface in addition to command line.

The output is the point. It is not a list of part numbers and it is not a PDF quote. It is an XLSX spreadsheet, written with XlsxWriter, where the numbers are live and the ordering lines are ready to paste.

The feature list in the README describes what ends up in that file. The spreadsheet contains quantity-adjusted pricing from each distributor for individual parts and the total board. Enter the number of boards to be built in a spreadsheet cell and all the pricing for the total board and individual parts is updated. The spreadsheet also shows the current inventory on-hand for each part at each distributor. And you can enter the quantity of each part that you want to purchase from each distributor, and lists of part numbers and quantities appear in formats that you can cut-and-paste directly into the website ordering page of each distributor.

That last item is the one that changes how the tool is used. The spreadsheet is not a report you read and then re-enter by hand. It is a purchase order generator, and the difference between a spreadsheet that reports a number and one that produces a shopping list is a couple of hours per order cycle.

The features are described in the README as easy installation via pip, and the documentation is at hildogjr.github.io/KiCost with a video quick start linked from the README.

The project is MIT licensed, the primary language is Python, and the last push was on 2026-07-08 alongside the v1.1.21 release.

## The inputs it accepts

KiCost is not tied to one CAD tool, and the input list is wider than the KiCad origin suggests.

It processes the BOM XML file from your KiCad schematic to create a part-cost spreadsheet by getting the price and inventory data of several popular distributors web servers. And it processes also BOM files from Altium, Proteus, Eagle, Upverter and hand made CSVs.

The KiCad path is the primary one, and it is the export format rather than the schematic file itself, which matters because it means KiCost does not need to parse KiCad's internal formats. You export, it reads.

The other five inputs are the practical answer to the obvious objection. A team that has migrated between CAD tools, or that has a legacy board, or that keeps its list in a spreadsheet already, does not have to convert everything back to KiCad to get a cost estimate. The hand made CSV route covers the case where the bill of parts exists only as a table someone maintains by hand.

And the feature list adds the escape hatch that matters most in practice. You can also enter your own quantity-adjusted pricing data for specialized parts or those not found at the supported distributors.

That last clause addresses the real limit of any automated pricing tool. Most of the parts on a mixed-signal board are catalogue parts with a distributor part number, but the handful of specialty parts are often the ones that cost the most, and no distributor website lists them. Entering your own price for those is what stops the estimate from being wrong in the direction that matters.

The repository layout shows where that lives. There is a kicost/ package, a src/ directory, a debian/ directory for Debian packaging, a docs/ folder, tests/, tools/, a requirements.txt and a setup.cfg alongside setup.py, and both README.md and README.rst at the root. The topics list names altium, bill-of-materials, bom, cad, cost-estimation, electronics-engineering and kicad.

## How the pricing data is obtained

The price and stock information comes from outside the tool, and the mechanism is worth understanding because it determines how much you should trust a number in the spreadsheet.

The requirements list shows the shape of it. beautifulsoup4 at 4.3.2 or later, with the comment to deal with HTML and XML tags, and lxml at 3.7.2 or later, used by beautifulsoup4 but optional. requests at 2.18.4 or later, commented as being for the scrape, API and web modules. And then two DigiKey API packages, kicost-digikey-api-v3 and kicost-digikey-api-v4.

So there are two routes to the same data. The HTML parsing stack is for scraping the distributors' own web pages, and the DigiKey API packages are for the distributor that offers an API. The validators package is there to check the datasheet URLs in the spreadsheet, and tqdm at 4.30.0 or later provides the progress bar while a long list of parts is being looked up.

This design has an obvious consequence. Any change to a distributor's page layout can break the lookup for that distributor, and prices and stock move for reasons the tool has no control over. The spreadsheet therefore reflects what the pages said at the moment the script ran, and it is a starting point for a quote rather than a substitute for one.

The currency handling is a related detail, and it is handled explicitly. The Makefile has an update-rates target, described as updating the currency exchange rates, which is a separate step from generating a spreadsheet. A board assembled in one currency and quoted in another needs the rates fixed at a known point in time, and having that as an explicit command rather than an implicit fetch makes the number reproducible.

The remaining dependencies are the user interface and the output. wxPython at 3.0.2 or later is the graphical package needed for the user guide, XlsxWriter writes the spreadsheet, colorama colors the terminal output, and pyyaml parses YAML.

## Installation and the KiCad integration

The install is by pip, and the setup.py shows what happens beyond the plain installation.

There is a post_install_setup function that runs the KiCost integration script after installation. On Windows it installs one additional library, pywin32, because it is needed to create the shortcut, and it prints a message if that install fails, noting that KiCost configuration related to the Windows registry may not work.

Then it runs the setup that creates the shortcut, the BOM module to Eeschema and the OS context menu. If the import of the internal setup function fails, it falls back to calling kicost --setup as an external command from a subprocess.

That fallback is the practical answer for anyone installing in an unusual way, since it means the integration step can always be run by hand. What it creates is the part that makes KiCost feel like part of KiCad rather than a separate program: a BOM export module inside Eeschema, so the button you press inside the schematic editor produces the file KiCost reads, plus a context menu entry in the operating system so a file can be costed without launching anything else.

The Windows-specific path is worth a note because it reveals the shape of the integration. The shortcut creation relies on a registry entry, which is why pywin32 is pulled in, and a registry-dependent step is exactly the kind that fails silently on a locked-down corporate machine.

The repository has a debian/ directory and the Makefile has deb and deb-clean targets for creating a Debian package, alongside the usual clean, lint, test, coverage, docs, dist and install targets. The test target runs flake8 first and then pytest, test-all runs the suite on every Python version with tox, and coverage runs the tests under coverage and generates an HTML report. The lint configuration lives in .flake8, and the CI is a GitHub Actions Python application workflow.

## Where KiCost fits, and where it stops

The comparison worth making is with the distributors' own quoting tools and with a spreadsheet you build by hand.

Against a distributor's own quoting page, the difference is that the distributor quotes their own catalogue and only their catalogue. A board that uses parts from three suppliers gets three quotes and three shipping charges, and the arithmetic of the total is yours. KiCost puts them in one spreadsheet with one total, and the quantity-adjusted pricing means the price for one part is not the price for a hundred.

Against a hand built spreadsheet, the difference is that the prices are fetched rather than typed. That is the whole value proposition and it is also its weakness, since a typed price is stale but honest and a scraped price can be wrong in a way that looks current.

The limits are concrete. The pricing depends on the distributors' web pages and on the DigiKey API packages, so a layout change breaks it and the failure is silent. There is no mention in the README of a schedule for re-checking prices, so a spreadsheet left open for a week is a week old. The parts that are not in the catalogue have to be entered by hand, and the tool gives you no way to tell from the spreadsheet which numbers came from where.

The scope is also worth stating. The tool prices a bill of materials. It does not check whether the parts are actually in stock across the market, it does not do lifecycle or risk analysis, it does not look at alternatives for a part you cannot buy, and it does not handle assembly labour, boards, or the cost of the fab run itself. It answers the parts question.

On maintenance, the picture is healthy but small. The releases are v1.1.21 from 2026-07-08, v1.1.20 from 2025-03-27 and v1.1.19 from 2024-05-06, so the project has shipped regularly, with a release roughly every year and a recent one. The MIT licence means the tool can be used commercially and modified, with the light obligation of keeping the copyright and licence notice.

## Conclusion

KiCost suits an electronics engineer who quotes a board, because the spreadsheet it produces is a working quote rather than a snapshot, since changing the number of boards or the quantities per distributor recalculates the cost and regenerates the order lines. It is the wrong tool if you need a static list of part numbers, and it is the wrong tool if you rely on distributor stock figures as ground truth, because the price and inventory data comes from scraping the distributors' web servers and from DigiKey API packages, so both drift. Before you rely on it, check the pricing columns against a live distributor page for one part, and note that the licence is MIT while the distributor terms and any API keys you use are separate obligations.

## FAQ

### What is KiCost?

It is a Python tool for generating part-cost spreadsheets for circuit boards developed with KiCad, run as a script or through a graphical user interface. It reads the bill of materials, fetches price and inventory data from distributor web servers, and writes a spreadsheet with quantity-adjusted pricing, totals, on-hand stock and paste-ready order lists.

### Which bill of materials formats does KiCost read?

It processes the BOM XML file exported from a KiCad schematic, and it also processes BOM files from Altium, Proteus, Eagle, Upverter and hand made CSVs. You can also enter your own quantity-adjusted pricing for specialized parts or for parts not found at the supported distributors.

### How does KiCost get distributor prices and stock levels?

The requirements list beautifulsoup4 and lxml for parsing HTML, requests for the scraping and API modules, and the kicost-digikey-api-v3 and kicost-digikey-api-v4 packages for the DigiKey API. tqdm provides a progress bar and the validators package checks the datasheet URLs included in the spreadsheet.

### How do I install KiCost and integrate it with KiCad?

Installation is via pip. The setup.py runs a post-install step that creates a shortcut, adds the BOM module to Eeschema and registers an OS context menu entry, and it can also be run by hand with kicost --setup. On Windows the setup additionally installs pywin32, and if that fails the registry-related configuration may not work.

### What can I change in the spreadsheet KiCost produces?

You can set the number of boards to be built in a cell and the pricing for the total board and individual parts updates, and you can enter the quantity of each part you want to buy from each distributor, after which lists of part numbers and quantities appear in a form you can cut and paste directly into the distributor's ordering page.

### What licence is KiCost released under?

MIT. The README lists free software with an MIT license, and the documentation is at hildogjr.github.io/KiCost. The most recent release is v1.1.21 from 2026-07-08, and the repository was last pushed on the same day.

## Sources

- [hildogjr/KiCost on GitHub](https://github.com/hildogjr/KiCost)
- [Issues](https://github.com/hildogjr/KiCost/issues)
- [License: MIT](https://github.com/hildogjr/KiCost/blob/master/LICENSE)
- [README](https://github.com/hildogjr/KiCost/blob/master/README.md)
- [Releases](https://github.com/hildogjr/KiCost/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/hildogjr-kicost
