# aws ce get-cost-forecast

AWS CLI commands · Updated 16 November 2026

**Short answer:** aws ce get-cost-forecast predicts your AWS spend for a future date range from your past usage. Use --metric UNBLENDED_COST, --granularity MONTHLY and a --time-period that starts today or later; add --prediction-interval-level 80 to get a low and high estimate around the mean.

## What the command does

Cost Explorer fits a forecast to your historical spend and returns a mean value for the whole period (`Total.Amount`) and per time bucket (`ForecastResultsByTime`). With a prediction interval, each bucket also has `PredictionIntervalLowerBound` and `PredictionIntervalUpperBound`.

The forecast only knows about the past. A new workload launched yesterday, or a large reservation purchase, will not be reflected properly until there is history to learn from.

## Syntax

```
aws ce get-cost-forecast \
  --time-period Start=<today-or-later>,End=<YYYY-MM-DD> \
  --metric UNBLENDED_COST|AMORTIZED_COST|... \
  --granularity MONTHLY|DAILY \
  [--prediction-interval-level 51-99] \
  [--filter file://filter.json]
```

## Worked examples

**Projected spend for the rest of this month**. Add the result to month-to-date actuals from [get-cost-and-usage](https://cloudconsole.dev/cli/ce-get-cost-and-usage) to estimate the full bill:

```
aws ce get-cost-forecast \
  --time-period Start=2026-11-16,End=2026-12-01 \
  --metric UNBLENDED_COST --granularity MONTHLY \
  --query "Total.[Amount,Unit]" --output text
```

**With an 80% prediction interval:**

```
aws ce get-cost-forecast \
  --time-period Start=2026-11-16,End=2026-12-01 \
  --metric UNBLENDED_COST --granularity MONTHLY \
  --prediction-interval-level 80 \
  --query "ForecastResultsByTime[0].[MeanValue,PredictionIntervalLowerBound,PredictionIntervalUpperBound]" \
  --output text
```

**Next three months, one figure per month:**

```
aws ce get-cost-forecast \
  --time-period Start=2026-12-01,End=2027-03-01 \
  --metric UNBLENDED_COST --granularity MONTHLY \
  --query "ForecastResultsByTime[].[TimePeriod.Start,MeanValue]" --output text
```

**Forecast for one service**, using the same filter syntax as get-cost-and-usage:

```
aws ce get-cost-forecast \
  --time-period Start=2026-11-16,End=2026-12-01 \
  --metric UNBLENDED_COST --granularity DAILY \
  --filter '{"Dimensions":{"Key":"SERVICE","Values":["Amazon Elastic Compute Cloud - Compute"]}}' \
  --query "Total.Amount" --output text
```

**Script it with today's date** (GNU `date`):

```
start=$(date +%F)
end=$(date -d "$(date +%Y-%m-01) +1 month" +%F)
aws ce get-cost-forecast --time-period Start=$start,End=$end \
  --metric UNBLENDED_COST --granularity MONTHLY --query Total.Amount --output text
```

## Options

| Option | Notes |
|---|---|
| `--metric` | One value, in upper case: `UNBLENDED_COST`, `AMORTIZED_COST`, `BLENDED_COST`, `NET_UNBLENDED_COST`, `NET_AMORTIZED_COST`, `USAGE_QUANTITY`, `NORMALIZED_USAGE_AMOUNT`. |
| `--granularity` | `DAILY` or `MONTHLY` for forecasts. |
| `--time-period` | Start must be today or later; End is exclusive. |
| `--prediction-interval-level` | Confidence level between 51 and 99. Higher means a wider range. |
| `--filter` | Narrow by service, account, Region, tag and so on. |

## Gotchas

- **Metric spelling differs from get-cost-and-usage.** There it is `UnblendedCost`; here it is `UNBLENDED_COST`. Mixing them up gives a validation error.
- **Start in the past fails.** A forecast cannot begin before today. For a full-month figure, combine actuals and forecast as shown above.
- **Too little history.** New accounts, or filters matching services you only just started using, may return an error saying there is not enough data to forecast.
- **It is billed per request** like other Cost Explorer API calls.
- **Use budgets for alerts.** A forecast is a number, not a notification. AWS Budgets can alert on forecasted spend; see [setting up a billing alarm](https://cloudconsole.dev/how-to/set-up-aws-billing-alarm).

## Questions

### How do I get my forecasted AWS bill for this month from the CLI?

Run get-cost-forecast from today to the first day of next month with --granularity MONTHLY, then add month-to-date actual cost from get-cost-and-usage for the same month.

### Why does get-cost-forecast say the start date is invalid?

The start of --time-period must be today or a later date. Past days are actuals, which you read with get-cost-and-usage.

### Can I forecast cost per service?

Yes. Pass a --filter on the SERVICE dimension. get-cost-forecast does not support --group-by, so run one call per service you care about.

## When this happens away from your desk

A forecast that jumps mid-month is worth knowing about before the invoice. CloudConsole is built to show cost trends next to alarms and resources on a phone.

[About the CloudConsole app](https://cloudconsole.dev/aws-console-app) · [Download on the App Store](https://apps.apple.com/app/cloudconsole-for-aws/id6835419710)

## Sources

- [aws ce get-cost-forecast (AWS CLI Command Reference)](https://docs.aws.amazon.com/cli/latest/reference/ce/get-cost-forecast.html)
- [GetCostForecast (AWS Billing and Cost Management API Reference)](https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_GetCostForecast.html)

## Related

- [aws ce get-cost-and-usage](https://cloudconsole.dev/cli/ce-get-cost-and-usage)
- [How to check your AWS bill](https://cloudconsole.dev/how-to/check-aws-bill)
- [How to set up an AWS billing alert](https://cloudconsole.dev/how-to/set-up-aws-billing-alarm)
- [Why is my AWS bill so high?](https://cloudconsole.dev/how-to/why-is-my-aws-bill-so-high)
- [How to stop AWS billing](https://cloudconsole.dev/how-to/stop-aws-charges)

---

Source: https://cloudconsole.dev/cli/ce-get-cost-forecast

CloudConsole is an independent iPhone and Android app for Amazon Web Services by Cloudconcur Ltd. It is not affiliated with Amazon Web Services.
