How many kilowatts does a sauna room need? Heater makers answer with rules of thumb: so many kW per cubic meter of room, plus extra for a glass door, plus extra for bare log walls. In this tutorial we take an open table of 280 sauna rooms and use lm() to find those rules again from the numbers alone.
Because the table was computed from the makers' published rules, we know the right answer in advance. That makes it a good sandbox for a skill that matters in every regression: reading residual plots to see which term your model is missing. We will fit three models, watch the residuals change, and end with a model that you can use to size a heater for a real room.
Everything runs in base R. No extra packages are needed.
The data
The data is the Sauna Heater Size Table (version 1.0, published by DIVELUX under the CC BY 4.0 license). It has one row for every room from 3 to 30 m³, with 0 to 4 m² of uninsulated glass or stone, with and without bare log walls. The CSV, a data dictionary and the list of sources are on the dataset page on GitHub.
url <- "https://raw.githubusercontent.com/divelux/sauna-heater-sizing-table/main/sauna_heater_sizing.csv"
heat <- read.csv(url)
heat$log_walls <- heat$log_walls == "true" # stored as the text "true"/"false"
dim(heat)
[1] 280 13
head(heat[, c("room_volume_m3", "uninsulated_area_m2", "log_walls", "kw_low", "kw_high")])
room_volume_m3 uninsulated_area_m2 log_walls kw_low kw_high
1 3 0 FALSE 2.1 3.0
2 3 1 FALSE 3.0 4.2
3 3 2 FALSE 3.8 5.4
4 3 3 FALSE 4.7 6.6
5 3 4 FALSE 5.5 7.8
6 4 0 FALSE 2.8 4.0
The columns we need:
room_volume_m3: the inside volume of the hot room (length × width × height).uninsulated_area_m2: glass door, window, bare stone, tile or brick with no insulation behind it. These surfaces soak up heat, so the room needs more power.log_walls:TRUEif the walls are bare logs instead of insulated panels.kw_highandkw_low: the top and the bottom of the recommended heater power range, in kW.
The design is a full grid, so every combination appears once:
table(volume = cut(heat$room_volume_m3, c(0, 10, 20, 30)),
glass = heat$uninsulated_area_m2, log = heat$log_walls)[, , "FALSE"]
glass
volume 0 1 2 3 4
(0,10] 8 8 8 8 8
(10,20] 10 10 10 10 10
(20,30] 10 10 10 10 10
That is the half of the grid without log walls (volumes grouped into three bins); the log half looks the same. 28 volumes × 5 glass areas × 2 wall types = 280 rows.
Look before you fit
We plot the high end of the range against room volume, with a separate panel for each wall type. The shade of blue shows the glass area, from 0 m² (light) to 4 m² (dark).
blues <- c("#84b9f3", "#519ced", "#257de0", "#1757ac", "#0e3d7e") # 0 to 4 m2
par(mfrow = c(1, 2), mar = c(4.2, 4.2, 2.5, 1), las = 1, bty = "l")
for (lw in c(FALSE, TRUE)) {
s <- heat[heat$log_walls == lw, ]
plot(s$room_volume_m3, s$kw_high, pch = 19, cex = 0.8,
col = blues[s$uninsulated_area_m2 + 1], ylim = c(0, 50),
xlab = "Room volume (m³)", ylab = "Heater power, high end (kW)",
main = if (lw) "Bare log walls" else "Insulated walls")
grid(col = "grey90", lty = 1)
}
legend("topleft", title = "Glass (m²)", legend = 0:4, pch = 19, col = blues,
bty = "n", cex = 0.85)

Three things stand out:
- Inside each panel the points form straight lines, so a linear model is a good idea.
- Glass shifts each line up by the same amount at every volume: an additive effect.
- The lines in the log panel are steeper. Log walls do not add a fixed number of kW; they change the slope. That is an interaction.
Let's see if the residuals tell us the same story when we start with a model that ignores all of this.
Model 1: volume only
The simplest rule: power depends only on room volume.
m1 <- lm(kw_high ~ room_volume_m3, data = heat)
round(coef(m1), 3)
round(summary(m1)$r.squared, 3)
(Intercept) room_volume_m3
2.40 1.25
[1] 0.81
An R² of 0.81 sounds fine, and the slope says "1.25 kW per m³". But this slope is an average over glass and log rooms, so it is too high for a plain insulated room and too low for a log room. The residuals show it:
res_plot <- function(m, main, where = "topleft") {
plot(fitted(m), resid(m), pch = 19, cex = 0.7,
col = ifelse(heat$log_walls, "#f47230", "#257de0"),
xlab = "Fitted kW", ylab = "Residual (kW)", main = main)
abline(h = 0, col = "grey40")
legend(where, legend = c("Insulated walls", "Bare log walls"), pch = 19,
col = c("#257de0", "#f47230"), bty = "n", cex = 0.85)
}
par(mar = c(4.2, 4.2, 2.5, 1), las = 1, bty = "l")
res_plot(m1, "Model 1: volume only")

A good model leaves a shapeless cloud around zero. Here the residuals have structure: log rooms (orange) sit mostly above zero and insulated rooms below it, the gap grows from left to right, and each color is split into bands, one per glass area. Every pattern is a missing term.
Model 2: add glass and log walls
m2 <- lm(kw_high ~ room_volume_m3 + uninsulated_area_m2 + log_walls, data = heat)
round(coef(m2), 3)
round(summary(m2)$r.squared, 4)
(Intercept) room_volume_m3 uninsulated_area_m2 log_wallsTRUE
-4.125 1.250 1.200 8.250
[1] 0.9676
Much better: R² is now 0.97, and the glass coefficient (1.2 kW per m²) is already the true value. But the model treats log walls as a fixed bonus of 8.25 kW, whatever the size of the room. Look at the residuals:
par(mar = c(4.2, 4.2, 2.5, 1), las = 1, bty = "l")
res_plot(m2, "Model 2: volume + glass + log walls", where = "bottomleft")

The two colors now cross in an X. A small log room gets too much power from the model, a big one too little: the effect of log walls grows with volume. In a formula that is room_volume_m3 * log_walls.
Model 3: let log walls change the slope
m3 <- lm(kw_high ~ room_volume_m3 * log_walls + uninsulated_area_m2, data = heat)
round(coef(m3), 3)
(Intercept) room_volume_m3
0.0 1.0
log_wallsTRUE uninsulated_area_m2
0.0 1.2
room_volume_m3:log_wallsTRUE
0.5
R prints a warning when you call summary(m3):
s3 <- summary(m3)
Warning message:
essentially perfect fit: summary may be unreliable
"Essentially perfect fit" is the honest answer here, and worth understanding. The residuals are tiny:
max(abs(resid(m3)))
[1] 1.678931e-13
The largest residual is about 0.0000000000002 kW: floating-point noise, not error. If you see this warning on real measurements, suspect a column that is computed from the others (a total next to its parts, for example). Here it means the table is exactly the rule that generated it, and the coefficients read that rule back:
- 1 kW per m³ of room volume (
room_volume_m3). - +1.2 kW per m² of glass, stone or tile (
uninsulated_area_m2), the same as adding 1.2 m³ of room. - +0.5 kW per m³ more for bare log walls (
room_volume_m3:log_wallsTRUE). With the base slope of 1, log walls make the room count as 1.5 times its real volume. - The intercept and the main
log_wallsterm are zero (to rounding).
In one line: kW = 1.0 × volume × (1.5 if log walls) + 1.2 × glass area. These are the figures Harvia publishes in its sizing advice, and you got them from the table alone.
A compact comparison of the three models:
data.frame(model = c("volume", "+ glass + log", "volume * log + glass"),
r_squared = round(sapply(list(m1, m2, m3),
function(m) suppressWarnings(summary(m)$r.squared)), 4),
resid_sd_kW = round(sapply(list(m1, m2, m3), sigma), 2))
model r_squared resid_sd_kW
1 volume 0.8096 4.91
2 + glass + log 0.9676 2.03
3 volume * log + glass 1.0000 0.00
Each added term cuts the typical error: from 4.91 kW, to 2.03 kW, to zero.
The low end of the range, and residuals that are not normal
The table also gives kw_low, the bottom of the power range. It is "1 kW per 50 cu ft" of the same calculated volume, rounded to 0.1 kW. Since 1 m³ is 35.3147 cu ft, the low end should be 35.3147 / 50 = 0.706 of the high end. A regression through the origin checks this:
m_low <- lm(kw_low ~ 0 + kw_high, data = heat)
coef(m_low)
range(resid(m_low))
kw_high
0.7063267
[1] -0.05033052 0.04938621
The slope is 0.706, as expected. This time the residuals are not zero, because kw_low was rounded. They stay inside ±0.05 kW. Let's look at their distribution:
par(mfrow = c(1, 2), mar = c(4.2, 4.2, 2.5, 1), las = 1, bty = "l")
hist(resid(m_low), breaks = 12, col = "#84b9f3", border = "white",
main = "Residuals, low-end model", xlab = "Residual (kW)")
qqnorm(resid(m_low), pch = 19, cex = 0.6, col = "#257de0", main = "Normal Q-Q plot")
qqline(resid(m_low), col = "grey40")

The histogram is flat, not bell-shaped, and the Q-Q plot bends into an S with short tails. That is what rounding error looks like: roughly uniform between minus and plus half a rounding step. Non-normal residuals are not always a problem; ask where the noise comes from. Here it is harmless, and the slope estimate is still precise:
round(confint(m_low), 4)
2.5 % 97.5 %
kw_high 0.7062 0.7065
Glass: two makers, two rules
The table also has the HUUM rules for rooms without log walls: huum_kw uses +1 m³ per m² of glass, and huum_na_kw uses the +1.5 m³ per m² from HUUM's North American sizing sheet. Fitting one model with a separate glass slope for each rule makes the difference explicit. First we stack the three columns into a long table:
ins <- heat[!heat$log_walls, ]
long <- data.frame(
room_volume_m3 = rep(ins$room_volume_m3, 3),
glass_m2 = rep(ins$uninsulated_area_m2, 3),
rule = factor(rep(c("Harvia", "HUUM", "HUUM North America"), each = nrow(ins))),
kw = c(ins$kw_high, ins$huum_kw, ins$huum_na_kw))
m_rule <- lm(kw ~ room_volume_m3 + glass_m2:rule, data = long)
round(coef(m_rule), 3)
(Intercept) room_volume_m3
0.0 1.0
glass_m2:ruleHarvia glass_m2:ruleHUUM
1.2 1.0
glass_m2:ruleHUUM North America
1.5
All three rules agree on 1 kW per m³ of room. They disagree on glass: 1.0, 1.2 or 1.5 kW per m². For a room with a lot of glass that is a real difference:
new_room <- data.frame(room_volume_m3 = 10, glass_m2 = 4,
rule = c("Harvia", "HUUM", "HUUM North America"))
cbind(new_room, kw = predict(m_rule, new_room))
room_volume_m3 glass_m2 rule kw
1 10 4 Harvia 14.8
2 10 4 HUUM 14.0
3 10 4 HUUM North America 16.0
A 10 m³ room with 4 m² of glass needs 14, 14.8 or 16 kW depending on whose rule you follow. When rules of thumb disagree by 2 kW, the manual of the specific heater you buy decides.
Using the model for a real room
Take a small home sauna: 2.0 m × 1.8 m and 2.1 m high, with a glass door of 0.7 m × 1.9 m, and insulated walls.
room <- data.frame(room_volume_m3 = 2.0 * 1.8 * 2.1,
uninsulated_area_m2 = 0.7 * 1.9,
log_walls = FALSE)
room
high <- predict(m3, room)
low <- predict(m_low, data.frame(kw_high = high))
round(c(low = unname(low), high = unname(high)), 1)
room_volume_m3 uninsulated_area_m2 log_walls
1 7.56 1.33 FALSE
low high
6.5 9.2
So this room wants a heater of roughly 6.5 to 9.2 kW. The same room with bare log walls:
room$log_walls <- TRUE
round(predict(m3, room), 1)
1
12.9
Log walls push the top of the range from 9.2 to 12.9 kW for the same floor plan. A heater that big needs a much heavier electrical circuit, which is one more reason to check the numbers with a professional.
Conclusions and limits
- A linear model recovered the published sizing rule exactly: 1 kW per m³, +1.2 kW per m² of glass or stone, and room volume × 1.5 for bare log walls.
- The residual plots pointed to each missing term before we added it: bands meant a missing additive variable (glass), a widening X meant an interaction (log walls × volume).
- An "essentially perfect fit" warning is a clue that the response is a formula of the predictors, not a measurement.
- Rounding noise gives flat, short-tailed residuals. A non-normal Q-Q plot is not always a problem.
What this model is not:
- It is a rule of thumb, not physics. Insulation, ventilation, the outdoor climate, the stones and how fast you want the room to heat all change the right answer. That is why the makers give a range, and why the HUUM and Harvia rules differ.
- The table covers 3 to 30 m³ and 0 to 4 m² of glass. Do not extrapolate a linear model outside the data.
- Choose the heater by its manufacturer's instructions, which give the allowed room volume, clearances and required circuit. Electric sauna heaters need a dedicated high-power circuit: have a licensed electrician size the breaker and wire and do the installation.
The dataset is free to reuse under CC BY 4.0; the GitHub page linked above also has a JSON version and the sources for each rule.
cat(R.version.string, "\n")
R version 4.1.2 (2021-11-01)
Code and text were prepared with the help of an AI assistant; all code was run and checked by the author.