jobmargin
Know which jobs actually made money. A CSV in, per-job P&L out: margin, markup, break-even revenue, portfolio totals, and a floor check that fails the run when a job lands under your minimum margin.
Install
pip install jobmargin
Compute job margins
jobs.csv:
job,revenue,labour_hours,labour_rate,materials,subs,other,overhead_pct
Kitchen,10000,40,50,2000,1000,500,10
Bath,8000,30,50,1500,500,0,10
jobmargin compute jobs.csv --min-margin 0.25
job revenue cost profit margin markup
--------------------------------------------------------------------
Kitchen 10,000.00 6,050.00 3,950.00 39.5% 65.3%
Bath 8,000.00 4,650.00 3,350.00 41.9% 72.0%
--------------------------------------------------------------------
PORTFOLIO 18,000.00 10,700.00 7,300.00 40.6%
0 job(s) below the 25% floor: none
Exit 1 when any job is below --min-margin — drop it into a weekly cron and find the leak before the quarter ends. Defaults for missing columns come from --overhead-pct and friends; --json for automation.
Price to a target margin
jobmargin price 600 --target-margin 0.4
# Cost 600.00 at 40% margin -> price 1,000.00 (profit 400.00)
The target is a fraction of the price (40% margin ≠ 40% markup): price = cost / (1 − margin).
Break-even
jobmargin breakeven --fixed 1000 --price 50 --variable 30
# Break-even: 50.00 units at 50.00 (revenue 2,500.00)
The formulas
| Metric | Definition |
|---|---|
| total cost | labour (hours × rate) + materials + subs + other + overhead (overhead_pct of direct costs + fixed) |
| margin | profit ÷ revenue |
| markup | profit ÷ cost |
| break-even revenue (a job) | equals its cost — job costs are fixed once scope is fixed |
| break-even units | fixed ÷ (price − variable per unit) |
Zero-revenue jobs report margin as — rather than dividing by zero, and count as "below any floor" so they can't hide.
Notes
- Pure stdlib, single file of inputs, deterministic output — safe to pipe into spreadsheets or dashboards.
- Currencies are unitless: pass everything in the same dollars.
- Pairs well with
holdbackcalc(deadline cash drag) andgstwatch(threshold tracking) for a small-operator finance kit.
License
MIT-style: use it, ship it, no warranty.
Metadata
Release files for jobmargin 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| jobmargin-0.1.1.tar.gz | 8.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| jobmargin-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.3 kB
Release files / jobmargin-0.1.1.tar.gz
| Download URL | jobmargin-0.1.1.tar.gz |
|---|---|
| Size | 8.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fe574b94a2ea9064355c0f3b0560479df421f8d4d2b272ee25c97cbd43810a8b
|
|
BLAKE2b-256 checksum How to use checksums |
6d52ff1f8ea70da04e1d18486050a593c0c2b25f5a0df347d0ec51c0aba7446d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.15
|
Release files / jobmargin-0.1.1-py3-none-any.whl
| Download URL | jobmargin-0.1.1-py3-none-any.whl |
|---|---|
| Size | 7.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ad4b8fe95d8536977b5519a2512c301f3c9e1e026635419ed116f383dd7c41e5
|
|
BLAKE2b-256 checksum How to use checksums |
b281fe09e9e485e09d2c67663be62d24d80f4bc66c27c25f9436eb2fe129ee06
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.15
|
Security for jobmargin 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.