MQTT Data Usage Calculator

Estimate the monthly data a device will use publishing over MQTT, useful for choosing a cellular IoT data plan.

Bytes per message
Messages per day
Per day
Per month (30 days)

Runs entirely in your browser. Nothing you enter is sent anywhere.

How it works

Each MQTT PUBLISH contains a fixed header, the topic name, a packet ID for QoS 1 and 2, and your payload. QoS 1 adds a 4-byte PUBACK from the broker. Every packet also carries TCP/IP headers, roughly 40 bytes for IPv4 without options.

The estimate leaves out connection setup, TLS handshakes, keep-alive pings and reconnections. Long-lived connections keep those small, but a device that reconnects for every message can use several times more data.

MQTT bytes = fixed header (2–5) + 2 + topic + 2 (QoS>0) + payload
Per message = MQTT bytes + overhead (+ PUBACK 4 + overhead for QoS 1)
Per day = per message × 86,400 / interval

Worked example

A 120-byte JSON payload on a 32-character topic, QoS 1, every 10 seconds: 159 bytes of MQTT plus 40 bytes of TCP/IP, and a 44-byte acknowledgement, about 243 bytes per message. At 8,640 messages a day that's 2.1 MB per day, around 63 MB per month.

Frequently asked questions

How can I reduce MQTT data usage?

Send only changes or summaries instead of raw readings, use a compact binary format instead of JSON, shorten topic names, and keep the connection open instead of reconnecting for each message.

Does TLS add overhead?

Yes. Each TLS record adds roughly 20–40 bytes, and every new TLS handshake costs several kilobytes. Raise the overhead value if you use TLS, and avoid frequent reconnects.

Related tools