3D Printer Temperature Tower Calculator

Enter the dimensions of your temperature tower and the layer settings from the slicer. The calculator maps each test section to the first real layer that can print it, then gives you a readable schedule and paste-ready temperature commands.

Your numbers
Enter the nozzle temperature assigned to the tower’s first test section.
Enter the absolute temperature difference between adjacent test sections.
Choose whether the tower becomes cooler or hotter as its height increases.
Count only the temperature-test sections, excluding any base below them.
Enter the Z height where the first labeled test section begins.
Measure the vertical distance between consecutive section boundaries in the model.
Use the first-layer height configured in the slicer.
Use the constant layer height applied after the first layer.
Leave this on the active hotend for a single-extruder printer.

What this calculator leaves out

  • The generated text is a temperature schedule or slicer macro, not a complete printer-ready G-code file.
  • Confirm every calculated temperature is within the filament manufacturer’s range and the printer hotend’s rated limit before printing.
  • Variable layer height invalidates the constant-layer-height mapping, so use the Z-height schedule or disable variable layers and preview the sliced file.

By using this calculator you agree to the Terms of Use. Results are estimates, not professional advice.

Final section temperature180

Tested temperature range
220°C, 215°C, 210°C, 205°C, 200°C, 195°C, 190°C, 185°C, 180°C
Temperature-change events
Layer 5 at 1 mm: M104 S220 Layer 55 at 11 mm: M104 S215 Layer 105 at 21 mm: M104 S210 Layer 155 at 31 mm: M104 S205 Layer 205 at 41 mm: M104 S200 Layer 255 at 51 mm: M104 S195 Layer 305 at 61 mm: M104 S190 Layer 355 at 71 mm: M104 S185 Layer 405 at 81 mm: M104 S180
PrusaSlicer/SuperSlicer macro
{if layer_z < 11} M104 S220 {elsif layer_z < 21} M104 S215 {elsif layer_z < 31} M104 S210 {elsif layer_z < 41} M104 S205 {elsif layer_z < 51} M104 S200 {elsif layer_z < 61} M104 S195 {elsif layer_z < 71} M104 S190 {elsif layer_z < 81} M104 S185 {else} M104 S180 {endif}
End of final test section (mm)
91
Tower schedule
SectionTarget (°C)Nominal start Z (mm)First layerActual layer Z (mm)
1220151
2215115511
32102110521
42053115531
52004120541
61955125551
71906130561
81857135571
91808140581

The schedule assumes one first layer followed by a constant regular layer height; adaptive or variable layers invalidate the layer mapping.

Paste the macro into PrusaSlicer or SuperSlicer Before layer change G-code, then preview the sliced file before printing.

How to use this calculator

  1. Enter the temperature for the first labeled section and the change between neighboring sections.
  2. Choose hot-to-cool or cool-to-hot, and count only the test sections rather than any base.
  3. Measure the first test section’s Z height and the height of each section in the model.
  4. Copy the first-layer and regular layer heights from the slicer profile you will actually use.
  5. Preview the sliced result after adding the generated commands, then inspect each completed section before choosing a temperature.

How a temperature tower layer is calculated

A temperature tower changes the nozzle target at the boundary between labeled sections. A model boundary is defined in Z height, but a slicer can only insert a per-layer command on a real printed layer. This calculator therefore maps each nominal boundary to the first layer top at or above it.

For section i, starting at zero, the target temperature and nominal start height are:

Tᵢ = T₀ + d × i × ΔT; Zᵢ = B + i × S

  • T₀ is the first-section temperature, ΔT is the temperature step, and d is −1 for hot to cool or +1 for cool to hot.
  • B is the first section’s start height and S is the section height.
  • F is the first-layer height and L is the regular layer height.

The first printable layer is nᵢ = 1 when Zᵢ ≤ F. Otherwise it is nᵢ = 1 + ceil((Zᵢ − F) ÷ L). Its actual layer-top height is Aᵢ = F + (nᵢ − 1) × L. Rounding up is intentional: a temperature change placed on the layer below a boundary would test part of the wrong section.

Using the schedule and macro

The table is the reference for any slicer: it shows the section number, target temperature, design height, layer number, and snapped layer height. The event list pairs each M104 command with that layer. Marlin documents M104 as a non-blocking hotend-target command; it continues printing while the hotend moves toward the new target.

For PrusaSlicer and SuperSlicer, paste the generated block into Before layer change G-code. The macro uses layer_z, which Prusa documents as available for layer-change custom G-code. It keeps the first temperature below the next snapped boundary, then selects the next temperature at that boundary. A macro may issue M104 on every layer; that is normal for this simple conditional approach.

What changes the result most

Section height and regular layer height determine whether a transition lands exactly on a model boundary. A first layer that differs from the regular height shifts all later layer numbers. Very short sections can share one printable layer, in which case separate temperatures cannot be tested cleanly. The starting temperature, step, and direction determine the tested range, but they do not establish whether those temperatures are safe or useful for a particular filament.

What this calculator leaves out

This tool produces a schedule and custom G-code text, not a complete printer-ready file. It assumes a constant layer height after the first layer; adaptive layers, model modifiers, and slicer-specific behavior can move events. It cannot identify the best-looking section, account for hotend heating lag, or verify the firmware’s M104 and tool-selection behavior. Check the filament maker’s range, the hotend rating, and the sliced preview before printing.

Worked example

Suppose a tower begins its first labeled section at 1 mm, has nine 10 mm sections, and is sliced with a 0.20 mm first layer and 0.20 mm regular layers. Start at 220°C and reduce by 5°C per section. For the first section, n₀ = 1 + ceil((1.00 − 0.20) ÷ 0.20) = 5, so layer 5 at 1.00 mm receives M104 S220.

The second nominal boundary is 11 mm. It maps to layer 1 + ceil((11.00 − 0.20) ÷ 0.20) = 55, whose top is 11.00 mm, so that event is M104 S215. The final, ninth section is 180°C and the final section ends at 1 + 9 × 10 = 91 mm. The macro compares layer_z with 11, 21, and each later snapped boundary to select the same temperatures.

Common questions

How do I find the section height of a temperature tower?

Measure the vertical distance from one labeled section boundary to the next in the model, preview, or model documentation. Do not include a solid base below the first test section unless the model labels it as a test section. Enter the first labeled boundary separately because many towers begin their tests above the bed.

Where does temperature-tower G-code go in PrusaSlicer?

Paste the generated macro into the Before layer change G-code field for the printer profile you will use. Prusa documents layer_z as available in layer-change custom G-code, which is why the macro uses it. Slice the tower again and inspect the preview or exported G-code to confirm the changes occur at the expected heights.

Should a temperature tower run from hot to cool or cool to hot?

Hot to cool is common because the first section starts at a temperature likely to melt and flow well, then tests lower targets. Cool to hot can also work if you need to avoid beginning above a material’s preferred range. Use a range supplied by the filament maker and avoid targets the hotend cannot safely reach.

Why did my whole temperature tower print at one temperature?

The custom G-code may be in the wrong field, the slicer may not support the macro syntax, or the exported file may not contain the M104 commands. Another possibility is that several very short sections snapped to the same printed layer. Check the event list and preview the final G-code before running the print.

What is the difference between M104 and M109?

M104 sets a hotend target and lets the printer continue, while M109 waits for the hotend to reach its target before continuing. A tower normally uses M104 so the print keeps moving through the section while the hotend changes temperature. Heating and cooling lag means the physical nozzle temperature may trail the command near a boundary.

Put this calculator on your site

Paste the snippet below where you want the calculator to appear. It stays up to date automatically and links back here.

<iframe src="https://countfolk.com/embed/3d-printer-temperature-tower-calculator/" title="3D Printer Temperature Tower Calculator" width="100%" height="640" style="border:0;max-width:44rem" loading="lazy"></iframe>