Elixir library and Mix task. Give it a stage-history CSV (one row per deal per stage, with the date the deal entered and left the stage) and it prints how many days deals spend in each stage: average, median and longest, slowest stage first. A row with no exit date is still in the stage and is measured up to the as-of date.
Part of the OneGTMLab free GTM tools. Background on the idea: middle of funnel.
Install
{:pipeline_stage_duration, "~> 1.0"} # in mix.exs depsUse
CSV columns: deal, stage, entered, exited (YYYY-MM-DD, exited empty for an open stage).
$ mix pipeline.stage_duration sample.csv --as-of 2026-11-28
stage deals avg median longest
proposal 3 24.7 22.0 32
negotiation 1 23.0 23.0 23
discovery 4 13.0 10.5 27
Test
mix testOffline, no network calls, no dependencies beyond the language runtime. MIT licensed.