Forecast your numbers with TimesFM
Sent! Open the email I just sent you and click the button to open your guide. Not there within 2 minutes? Check your spam or Promotions tab.
The guide from the FUTUR video: what TimesFM, Google's forecasting model, is, the 3 ways to use it (Claude Code installs it, Google Sheets and BigQuery, Python), how to read the range, the limits and the licence, and a prompt template for Claude Code. In French and English.
From a column of numbers to a forecast
- TimesFM in 4 linesTimesFM is a Google Research model that forecasts what comes next in a series of numbers over time: sales, site visits, bookings, stock. It was pre-trained on 100 billion real-world data points, including Google Trends and Wikipedia page views (Google Research post of 02/02/2024). The upshot: you have nothing to train. You give it your history, it forecasts what comes next. The code is free and open (Apache-2.0).
- Get your numbers readyYou need two columns: a date and a value. Dates must be regular (every day, every week or every month), with no gaps. The more history, the better. One series = one thing to forecast (for example one shop's sales). If you have several shops, add a column that identifies them. These tips are ours: they are the basics of any forecast.
- Way 1 → Claude Code installs it for youThe easiest if you have Claude Code. The official repo even ships an instructions file for agents (timesfm-forecasting folder, SKILL.md file): it first checks your computer has enough memory (at least 4 GB of RAM advised for version 2.5). Open Claude Code in the folder that holds your file, paste the prompt template below, and let it install, run the forecast and draw you a chart. The install Claude Code will run:
The command (PyTorch):
pip install timesfm[torch]
- Way 2 → Google Sheets and BigQuery, no codeSince 16/02/2026, Google Sheets can run a TimesFM forecast with Connected Sheets (advanced analytics menu, "Create a forecast"). Careful: Connected Sheets reads data stored in BigQuery, so you need a Google Cloud account, and queries are billed at BigQuery ML rates. In BigQuery itself, one SQL query is enough (the AI.FORECAST function). Replace the table and column names with yours:
Forecast 30 days in BigQuery:
SELECT * FROM AI.FORECAST( TABLE `my_project.my_dataset.sales`, data_col => 'amount', timestamp_col => 'date', horizon => 30 );
- Way 3 → Python, on your computerFor people who code. Here is the minimal example from the official repo (version 2.5, open licence), with a list of numbers to replace with yours. The model weighs about 800 MB and runs on an ordinary processor, faster with a graphics card. It returns a central forecast and the range.
Minimal example (TimesFM 2.5):
# pip install timesfm[torch] import torch, numpy as np, timesfm torch.set_float32_matmul_precision("high") model = timesfm.TimesFM_2p5_200M_torch.from_pretrained( "google/timesfm-2.5-200m-pytorch" ) model.compile(timesfm.ForecastConfig( max_context=1024, max_horizon=256, normalize_inputs=True, use_continuous_quantile_head=True, force_flip_invariance=True, infer_is_positive=True, fix_quantile_crossing=True, )) # Replace with your history (one value per day, week or month) history = np.array([120, 135, 128, 150, 162, 158, 171, 180], dtype=np.float32) point, quantiles = model.forecast(horizon=4, inputs=[history]) print(point) # central forecast print(quantiles) # the range - Read the rangeTimesFM does not give a single number. It gives a central forecast and a range. In Python these are levels from 10% to 90%: the 10% level is a low scenario (the real value should rarely fall below it), the 90% level a high scenario. In Sheets and BigQuery you get a lower and an upper bound, with a 95% confidence level by default. A wide range means the model is unsure. Base your decisions on the lower bound when a mistake is expensive (stock, cash).
- Add outside factorsTimesFM can take outside factors into account, called covariates: a price, a promotion, a public holiday, the weather. It works in version 2.5 (the "xreg" option in Python) and natively in version 3.0. Start without them: run a plain forecast, check it makes sense, then add one factor at a time. The example factors above are ours.
- Limits to know1. Licence: the code and the models up to version 2.5 are open (Apache-2.0), even for commercial use. TimesFM 3.0 weights (August 2026) are under a non-commercial licence: for your business, use 2.5, or 3.0 through BigQuery ML, where commercial use is allowed. 2. BigQuery and Connected Sheets are billed per query: check BigQuery ML pricing before running large volumes. 3. It is not a crystal ball: it extends what your numbers show. An event your history does not contain (a new competitor, a crisis), it cannot see. 4. The open source version is not an officially supported Google product.
- The prompt template for Claude CodeOpen Claude Code in your file's folder, paste this template and fill in the brackets. A filled-in example is further down, under "Prompts to try".
The template:
GOAL Forecast [WHAT I WANT TO FORECAST] for the next [NUMBER] [DAYS / WEEKS / MONTHS] with TimesFM 2.5 (google-research/timesfm). MY DATA - File: [FILE NAME .csv or .xlsx] - Date column: [NAME] - Value column: [NAME] WHAT YOU DO 1. Read the SKILL.md in the repo's timesfm-forecasting folder and check my computer has enough memory. 2. Install TimesFM in a separate Python environment. Tell me what you install first. 3. Check my data: regular dates, gaps, odd values. Show me what you fix. 4. Run the forecast with the range (10% and 90%). 5. Draw a chart: history, forecast, range. Save it as a PNG. 6. Write a 5-line summary in plain English: trend, low scenario, high scenario. RULES - Use the TimesFM 2.5 weights (Apache-2.0 licence), not 3.0. - Never edit my original file: work on a copy. - When in doubt, stop and ask me.
Prompts to try
Links
This short was made with the Shorts Machine: a topic goes in, a finished vertical short comes out (script, voice, editing, captions, cover). In Claude Code or Codex, on your computer.
Discover the Shorts Machine →Source reviewed: https://github.com/google-research/timesfm on 2026-10-31.