Skip to content
Tutorials Center
My learning

Topics

Lesson 26 of 29 ยท Projects

Project: Release Forecast from Velocity

Forecast a release date from sprint velocity in Python: burnup chart, best and worst cases, scope growth and a Monte Carlo simulation with percentiles.

"When will we ship?" is the question every Product Owner hears. A weak answer is one date calculated from an average. A better answer is a range that says how likely each date is, and that also admits that the scope may grow. In this project you will build such a forecast in Python from a team's sprint history, using only the standard library.

You will draw a text burnup chart, compute best-case, typical and worst-case release sprints from recent velocities, and then run a Monte Carlo simulation that adds random scope growth. The concepts come from Velocity, Burndown and Cumulative Flow and Estimating with Story Points; the simulation idea is the same as in Project: Kanban Flow Simulator. The numbers here are invented, and the Python runs in your browser. Jira's own Release and Version reports are screens you open in Jira, so this project is a stand-in for the reasoning behind them.

A forecast in three layers

Look back Velocity and burnup from past Sprints.
Bracket it Best, typical and worst cases.
Simulate Random velocity and scope growth.
Quote a range Dates with confidence levels.

A range is honest; a single date is a guess in disguise.

1 / 2

Step 1: History and the burnup chart

A burnup chart plots two lines over time: the total scope (everything the release needs) and the work completed. It is better than a burndown for release forecasting because scope changes show up as the top line moving, rather than hiding inside a falling line. When the completed line reaches the scope line, the release is done.

The data below has eight finished Sprints. Each has the points completed and the total scope at the end of that Sprint. Scope grew from 120 to 150 points because new requirements arrived, which is normal.

Python Burnup from sprint history

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The chart shows steady progress, but the dots at the right keep sliding away: the team completed 140 points while the scope grew by 30. A forecast that ignores scope growth will always be optimistic. Also notice that velocity is bumpy (14 to 21), and that bumpiness is the thing a good forecast should respect.

Step 2: Best, typical and worst case

The simplest forecast uses three numbers taken from recent Sprints:

  • Typical: average velocity of the last Sprints.
  • Best case: the best velocity in that window.
  • Worst case: the worst velocity in that window.

Divide the remaining points by each to get the number of Sprints, and always round up (a Sprint that is only 10 percent used still occupies a whole Sprint on the calendar). Using the last three to six Sprints keeps the forecast current without being thrown off by a single outlier.

If scope keeps growing at a known rate, subtract it from the velocity: a team that finishes 18 points a Sprint while the scope grows by 4 points a Sprint only reduces the remaining work by 14 points per Sprint.

Step 3: Monte Carlo with scope growth

The three-point forecast only shows the edges. Monte Carlo fills in the middle. Each trial plays out the future Sprint by Sprint: pick a random velocity from the history (with replacement), add a random amount of new scope, and subtract. When the remaining work reaches zero, record how many Sprints it took. After 10,000 trials, the sorted results give percentiles.

The random generator is seeded (random.seed(11)), so the output is the same every time you run it. Change the seed or the scope growth to see how the picture shifts.

Python Monte Carlo release forecast

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Imagine the team now starts a new release with 60 points in the backlog. The three-point forecast gives 3 Sprints (best case), 4 (typical) and 4 (worst case), because the last four velocities were 17, 19, 15 and 20. It looks reassuring, but it ignores that scope grows. The simulation adds that: its median is 5 Sprints, and 6 Sprints cover about 85 to 95 percent of the simulated futures (release by 2026-06-28 if the next Sprint starts on 2026-04-06). The honest sentence for stakeholders has the form "most likely 5 Sprints, and we are about 85 percent sure of 6", not a single date.

What can go wrong

  • Different sized items. Velocity in points hides size variation; if your stories vary wildly, split them first.
  • A changed team. If people join or leave, old Sprints no longer describe the future. Use only Sprints since the change.
  • Hidden scope. Defects found late and unplanned support work are scope too. Count them, or the forecast stays optimistic.
  • False precision. Do not quote a date to the day. Quote Sprints or weeks with a confidence level.
  • Forecast as promise. A forecast is an input for conversation: if the date is too late, change the scope, not the estimate.

Extending the project

  1. Read the history from a CSV string using the csv module, as in Velocity, Burndown and Cumulative Flow.
  2. Replace random choice with a normal distribution (random.gauss) and compare the percentiles.
  3. Add a must-have and a nice-to-have scope, and forecast each separately. Must-haves are often safe, nice-to-haves rarely are.
  4. Add a holiday calendar that removes working days from some Sprints.
  5. Plot the 50th and 95th percentile lines on the burnup chart.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Why is a burnup chart better than a burndown for release forecasting?

    A burnup keeps total scope and completed work as separate lines, so growth in scope is visible rather than hidden inside a flat or rising burndown.
  2. 2. Why do we round the number of remaining Sprints up?

    Sprints have fixed length. Work that needs 3.2 Sprints cannot finish before the end of the fourth.
  3. 3. What does the 85 percent confidence figure from the simulation mean?

    Percentiles come from the sorted trial results. It is a statement about the simulated outcomes, not a guarantee.
  4. 4. A team's composition changed three Sprints ago. Which history is the best input for the forecast?

    Monte Carlo assumes the future resembles the sampled past. After a major change, older Sprints no longer describe the team.

Summary

  • A burnup chart plots completed work against total scope, so growing scope is visible.
  • Best, typical and worst cases come from the best, average and worst of recent velocities, with remaining work divided by each and rounded up.
  • Monte Carlo replays randomly chosen past velocities and random scope growth to give percentiles for the number of Sprints.
  • Quote a range with a confidence level, not a single date, and remember that scope is part of the forecast.
  • The data and code here are a teaching example; Jira's release reports display similar numbers but are not run on this site.

Next, test yourself in Practice Exercises with Solutions.