# How to find links between your workouts, sleep and nutrition

> Export one row per day from each app, join them on the date, and shift sleep data by one day so each workout lines up with the night after it. Use Spearman correlations on 60+ days with both values, treat unlogged days as blank, and only trust links that survive a false discovery rate correction and repeat in later data.

Source: https://templatetrainer.com/guides/workout-sleep-and-nutrition-correlations/ · By Jordan DuBois · Updated 2026-10-14 · Template Trainer

Does a heavy leg day wreck your sleep? Does a big protein day lift your readiness score? If you track your workouts, wear an Oura ring and log food in Cronometer, you already have the data to find out. This guide shows you how to put the three together and test for real patterns, first by hand in Google Sheets and then with an AI model like Claude, Gemini or ChatGPT, using a prompt you can copy.

The method matters more than the tool. Personal data is noisy, days are not independent of each other, and if you test 50 pairs of numbers, a few will look related by pure chance. The steps below are built to stop you chasing those.

## What data do you need?

You need one file per app, each with **one row per calendar day** and a date column.

| App | File | Useful columns |
| --- | --- | --- |
| Template Trainer | Daily summary CSV | `trained`, `working_sets`, `volume`, `volume_7d`, `volume_28d`, `legs_sets` and the other muscle group columns, `session_min`, `last_finished`, `days_since_workout`, `bodyweight` |
| Oura | Sleep and readiness export | Readiness score, sleep score, total sleep, deep sleep, average HRV, lowest resting heart rate |
| Cronometer | Daily nutrition export | Calories, protein, carbs, fat, fiber, and anything else you care about, like caffeine or alcohol |

Aim for **at least 60 days where all the files have a value**, and 90 or more if you can. With fewer days, only very strong effects can stand out from day-to-day noise.

## How do you export each file?

**Template Trainer.** Open Profile, tap **Export workout data**, and choose **Daily summary**. (It's also on the Progress page.) You get one row per date from your first workout to today. Rest days are included with `trained` set to 0, which is exactly what you want, because rest days are the comparison group. Volume is reps times weight of the sets you completed, warm-ups left out, in your profile's unit. Dates use your phone's time zone, so an evening workout counts for that evening's date.

**Oura.** Oura's help center says you can download your data as a CSV from the Membership Hub (choose **Export data**, and Oura emails you when the file is ready) or from Oura on the Web. Note that Oura gives durations in **seconds**, so divide sleep times by 3,600 to get hours.

**Cronometer.** In Cronometer on the web, open your account settings, choose **Export Data**, pick the date range and export **Daily Nutrition**. That file has one row per day with your total calories, macros and micronutrients.

Menus change from time to time. If a label has moved, search the app's help pages for "export data".

## How should the dates line up?

This is the step most people get wrong, and it changes every answer.

- **Oura dates a night by the morning you wake up.** A workout on Monday can only affect the sleep that Oura records for Tuesday. So compare each workout day with the **next day's** sleep and readiness.
- **Food can work both ways.** What you eat on Monday can fuel Monday's workout (same day), and Monday's dinner can affect Monday night's sleep, which Oura records on Tuesday (next day). Test both.
- **Training load builds up.** One hard session may do little, while a hard week does a lot. That's why the daily summary has `volume_7d` and `volume_28d`, the rolling totals for the last 7 and 28 days.

A useful set of comparisons, then:

| Question | Compare | With |
| --- | --- | --- |
| Do hard sessions hurt my sleep? | `volume` on day D | Oura sleep score, deep sleep and HRV on day D+1 |
| Does a hard week lower my readiness? | `volume_7d` on day D | Readiness on day D+1 |
| Do late workouts hurt my sleep? | `last_finished` on day D | Sleep score on day D+1 |
| Does protein help me recover? | Protein on day D | Readiness on day D+1 |
| Do I train better after good sleep? | Sleep score on day D | `volume` on day D (training days only) |

## How do you do it in Google Sheets?

1. **Import the files.** Create a new sheet and use **File > Import > Upload**, choosing **Insert new sheet(s)** for each file. Name the tabs `Workouts`, `Oura` and `Food`.
2. **Check the dates.** Select each date column and use **Format > Number > Date**. If a date stays left-aligned, Sheets is treating it as text and the lookups below will miss it.
3. **Clean up empty days.** Cronometer can show 0 calories for a day you didn't log. A zero there isn't real, so delete those rows (or blank the cells). The same goes for nights you didn't wear the ring.
4. **Build a joined tab.** Make a tab called `Joined` and put the workout dates in column A with `=Workouts!A2:A`. Then pull the other columns in next to them. For example, with Workouts `volume` in column L, put this in B2 to bring in each day's volume:

   ```
   =XLOOKUP(A2, Workouts!A:A, Workouts!L:L, "")
   ```

   With Oura's date in column A and readiness in column C, put this in C2 to bring in the next day's readiness. The `A2+1` is the next-day shift:

   ```
   =XLOOKUP(A2+1, Oura!A:A, Oura!C:C, "")
   ```

   Fill the formulas down. Adjust the column letters to match your files.
5. **Find the correlation.** Spearman's correlation is safer than the standard (Pearson) one for this kind of data, because it doesn't assume a straight-line relationship and a single odd day can't dominate it. Sheets has no Spearman function, but this formula computes it from ranks and skips days where either value is missing:

   ```
   =LET(ok, ISNUMBER(B2:B)*ISNUMBER(C2:C), x, FILTER(B2:B, ok), y, FILTER(C2:C, ok), CORREL(MAP(x, LAMBDA(v, RANK.AVG(v, x, 1))), MAP(y, LAMBDA(v, RANK.AVG(v, y, 1)))))
   ```

   Paste each formula into a single cell. If you paste it with line breaks, Sheets splits it across rows.

6. **Count the days used:** `=SUMPRODUCT(ISNUMBER(B2:B)*ISNUMBER(C2:C))`.
7. **Compare training days with rest days.** This is often clearer than a correlation. With `trained` in column D, this is your average next-day readiness after training days:

   ```
   =AVERAGEIFS(C2:C, D2:D, 1, C2:C, "<>")
   ```

   Change the `1` to `0` to get the average after rest days.

8. **Plot it.** Select two columns and use **Insert > Chart > Scatter chart**. If the "relationship" is one or two extreme days, you'll see it immediately.

### How strong is strong?

As a rough guide for personal daily data: a Spearman correlation below 0.1 either way is basically nothing, 0.1 to 0.3 is small, 0.3 to 0.5 is moderate, and above 0.5 is large. Most real links between training, food and sleep are small. That's normal, and small can still be worth acting on if it's consistent.

Sheets is good for exploring, but it can't easily correct for the two problems in the next section. Treat anything you find in Sheets as a lead to check, not a conclusion.

## Why are most correlations in personal data misleading?

Two problems make naive correlations look far more impressive than they are.

**Days aren't independent.** Your sleep tonight is a lot like your sleep last night, and your training this week is a lot like last week. Both series drift together with the seasons, a new program, a busy month at work. Statistics that assume every day is independent then overstate how sure you can be, and two unrelated series that both trend over time can look strongly correlated. A 2016 paper in Behavior Research Methods showed that cross-correlating time series like these can produce spurious relationships, and that removing each series' own pattern first (detrending or "prewhitening") is needed before reading the result. The simple fix is to compare each day with your recent normal: subtract a rolling 28-day average, or look at the change from the day before.

**Testing lots of pairs finds false positives.** At the usual 5% significance level, about 1 in 20 tests of unrelated variables will look "significant" by chance. Correlate 10 workout columns with 10 sleep and nutrition columns and you've run 100 tests, so expect around 5 false hits. The Benjamini-Hochberg procedure, published in 1995, controls the share of false discoveries among the results you call significant, and it's the standard way to handle this.

Two more habits keep you honest:

- **Hold some data back.** Find patterns in the first two thirds of your history, then check whether they still show up in the last third. A real effect usually does. A fluke usually doesn't.
- **Remember it's correlation.** If you train harder on days you feel great, high volume and high readiness will go together without either one causing the other. To test a cause, change one thing on purpose for a few weeks (say, finishing workouts before 6 pm) and see if the numbers move.

## How do you run a full analysis with an AI model?

Models like Claude, Gemini and ChatGPT can read CSV files and run real statistics by writing and running code. Upload all three files in one conversation and paste the prompt below. It tells the model exactly how to line up the dates, handle missing days and avoid the traps above.

A few tips first:

- **Use a mode that runs code.** Answers worked out "in the model's head" from a large file aren't reliable. Claude's analysis tool, ChatGPT's data analysis and Gemini's code execution all run Python on your files.
- **Check the counts.** The prompt asks the model to report how many days it matched. If that number looks wrong, the dates didn't line up.
- **Your data is personal.** Check the AI provider's privacy settings before uploading health data.

### The prompt

```text
I've uploaded three CSV files with one row per calendar day:
1. Template Trainer "Daily summary" (workouts). Columns include date, trained (1 or 0),
   working_sets, volume, volume_7d, volume_28d, session_min, last_finished (HH:MM),
   days_since_workout, bodyweight and _sets.
2. Oura (sleep and readiness). Durations are in seconds.
3. Cronometer "Daily Nutrition".

Run a careful, statistically sound analysis of how my training, nutrition, sleep and
readiness relate. Write and run Python code for every number you report. Do not estimate.

Data preparation
- Parse every date column to a calendar date and join the files on date.
- Oura dates a night by the morning I woke up. For "training or food on day D -> sleep
  or readiness", match day D with Oura day D+1. Also test same-day (D) for food -> training.
- Treat Cronometer days with 0 or missing calories, and Oura days with no sleep data, as
  missing, not zero. Drop them pairwise, not whole rows.
- Convert Oura durations to hours. Convert last_finished to hours after midnight.
- Report the date range and the number of usable days for each file and each pair.

Analysis
1. Descriptive: mean, median, SD and missing-day count for each variable, and a short
   summary of my training pattern (training days per week, typical volume).
2. Pre-specified questions (answer each one):
   a. Do training days vs rest days differ in next-day readiness, sleep score, deep sleep,
      HRV and resting heart rate? Use Mann-Whitney U with a rank-biserial effect size.
   b. Does session volume (training days only) relate to the same next-day measures?
   c. Do volume_7d and volume_28d relate to next-day readiness and HRV?
   d. Does a later last_finished time relate to next-night sleep?
   e. Do calories, protein, carbs and fat on day D relate to next-day readiness and sleep,
      and to same-day volume?
   f. Does next-day readiness change by muscle group trained (for example legs_sets > 0)?
3. Use Spearman correlations with 95% bootstrap confidence intervals.
4. Correct for autocorrelation: repeat each test on detrended data (each value minus its
   own 28-day rolling mean) and use a block bootstrap (7-day blocks) for the confidence
   intervals. Report lag-1 autocorrelation for each main variable.
5. Correct for multiple comparisons with Benjamini-Hochberg across all tests (FDR 10%).
6. For any result that survives, fit a regression of the outcome on the predictor plus
   weekday, a linear time trend and the other main predictors, with Newey-West (HAC)
   standard errors, to check it holds after controlling for confounders.
7. Robustness: split the data by time (first two thirds vs last third) and report whether
   each surviving result has the same direction and similar size in both parts.

Output
- A plain-language summary first: the 3 to 5 most reliable findings, each with its effect
  size, 95% CI, adjusted p-value, number of days and whether it replicated in the holdout.
- A table of every test run, including the ones that found nothing.
- Scatter or box plots for the surviving findings.
- Clearly separate "reliable", "suggestive (didn't survive correction or didn't
  replicate)" and "no evidence".
- State the limits: this is observational data from one person, so findings are
  correlations, not proof of cause. Suggest one simple self-experiment I could run to test
  the strongest finding.
- Don't give medical advice. Flag anything that looks like it should be discussed with a
  doctor.
```

If the model skips a step or the counts look off, reply with "Show me the code you ran for step 4" or "List the dates you dropped and why". Asking to see the work is the fastest way to catch mistakes.

## What do you do with the results?

Use what you find to adjust your training, not to judge it. If next-day readiness reliably drops after high `volume_7d`, that's a sign your weekly load may be more than you recover from, and a well-timed [deload](https://templatetrainer.com/guides/what-is-a-deload/) might help (here's [how to deload](https://templatetrainer.com/guides/how-to-deload/)). If late workouts reliably cost you sleep, try moving them earlier for a few weeks and run the analysis again. And keep the basics in mind: [progressive overload](https://templatetrainer.com/guides/progressive-overload/) only works if you recover from the work.

Template Trainer is free and logs every set with its date, so your daily summary is ready to export whenever you want to run this. [Start free](https://templatetrainer.com/?signup) and the export is in Profile.

This guide is general information, not medical advice. If your sleep, heart rate or recovery numbers change suddenly or worry you, talk to a doctor.

## Frequently asked questions

### How many days of data do I need to find a correlation?

At least 60 days where every file has a value, and 90 or more is better. With 60 days, only moderate effects (a correlation around 0.3 or more) are likely to stand out from the noise. Small effects need much more data.

### Why compare my workout with the next day's Oura data?

Oura dates each night by the morning you wake up. The sleep after a Monday workout shows up under Tuesday, so you shift the Oura data back by one day to line each workout up with the night that followed it.

### Should I use Pearson or Spearman correlation?

Spearman for most personal data. It works on ranks, so it handles curved relationships and isn't thrown off by a few extreme days, like a night of terrible sleep or a huge meal.

### Can I upload the files to ChatGPT, Claude or Gemini?

Yes. Upload all three CSV files in one conversation, make sure the model can run code on them, and paste the prompt from this guide. Check each provider's privacy settings before sharing health data.

### What if Cronometer shows zero calories on days I didn't log?

Treat those days as missing, not zero. A day with 0 calories logged would otherwise look like a fasting day and distort every food result.

### Does a correlation mean my workouts are causing poor sleep?

Not on its own. Both could be driven by something else, like a stressful week. To test cause and effect, change one thing on purpose for a few weeks and see whether the numbers follow.

## Sources

- [Oura (2026), How do I export my data?, Oura Help](https://support.ouraring.com/hc/en-us/articles/360025441594)
- [Dean and Dunsmuir (2016), Dangers and uses of cross-correlation in analyzing time series in perception, performance, movement, and neuroscience, Behavior Research Methods](https://doi.org/10.3758/s13428-015-0611-2)
- [Benjamini and Hochberg (1995), Controlling the False Discovery Rate: A Practical and Powerful Approach to Multiple Testing, Journal of the Royal Statistical Society: Series B](https://doi.org/10.1111/j.2517-6161.1995.tb02031.x)

## About the author

Jordan DuBois has been lifting for 20 years and won men's lightweight bodybuilding as a natural at a 2013 NPC show in Mesa, Arizona. Jordan holds summa cum laude degrees in applied mathematics and biology from Arizona State University, and founded Template Trainer to run proven programs the way their authors wrote them. [Bio](https://templatetrainer.com/authors/jordan-dubois/)
