VEXXHOSTDocumentation
Guides

Forecast your spending

Forecast a project's spending for the coming days or months with Cost Explorer, based on its recent daily average.

This guide forecasts a project's spending for the rest of the month. Read Forecasts first to know what a forecast can and cannot predict.

Before you begin

Sign in with the CLI, get a token for the API, or create the Python client.

1. Request the forecast

A forecast period starts today or later and ends within 90 days. Choose daily rows to see each day, or monthly for one total per month. This request forecasts from today, October 7, to the end of October, using the last 7 days of spending:

openstack cost forecast create \
  --start 2026-10-07 \
  --end 2026-11-01 \
  --granularity monthly \
  --lookback-days 7

Forecasts take the same filters as cost reports. See Break down your costs.

2. Read the result

+----------------------+----------------------+------------------+------+-----------+
| Start                | End                  | Amount           | Unit | Estimated |
+----------------------+----------------------+------------------+------+-----------+
| 2026-10-07T15:20:00Z | 2026-11-01T00:00:00Z | 865.425000000000 | USD  | True      |
+----------------------+----------------------+------------------+------+-----------+

The API returns the same forecast with the history it averaged:

{
  "as_of": "2026-10-07T15:20:00Z",
  "model": "trailing_spend_average",
  "estimated": true,
  "history_period": {"start": "2026-09-30T15:20:00Z", "end": "2026-10-07T15:20:00Z"},
  "total": {"amount": "865.425000000000", "unit": "USD"},
  "regions": [{"name": "ca-ymq-1", "data_through": "2026-10-07T14:00:00Z"}],
  "forecast_results_by_time": [
    {
      "time_period": {"start": "2026-10-07T15:20:00Z", "end": "2026-11-01T00:00:00Z"},
      "mean_value": "865.425000000000"
    }
  ]
}

A period that starts today begins at the current time, which as_of shows. The project is forecast to spend about 865 more by the end of October.

Verify

Compare the forecast with what the month has cost so far: add a cost report from October 1 to today, and the sum is the expected total for October.

Next steps

On this page