CCTV Calc — how the math works
Every number the app shows, and where it comes from.
The app is a planning tool. Each section below gives the formula, the constants and the standard it follows, so you can check any result by hand and know where a real installation may differ.
Storage and bandwidth
Bitrate. Unless you enter the camera's configured bitrate, each stream is estimated from a reference point of 4,000 kbps for 1080p (2.07 MP) H.264 at 30 fps in a typical scene. Bitrate grows with pixel count sublinearly, because larger frames compress better per pixel; an exponent of 0.8 reproduces the common vendor tables (about 2 Mbps at 1 MP, 6 Mbps at 4 MP, 12 Mbps at 8 MP).
| Codec factor | Scene factor |
|---|---|
| H.264 1.00 · H.264+ / smart 0.60 · H.265 0.55 · H.265+ / smart 0.30 | Low (indoor, static) 0.7 · Medium 1.0 · High (traffic, foliage, night noise) 1.4 |
Frame rate scales linearly, which is conservative for inter-frame codecs at high frame rates. Multi-sensor cameras multiply the stream by the sensor count.
Storage. Bytes per day = kbps × 1000 ÷ 8 × 86,400 × duty, where duty is 1 for continuous recording, the percentage you set for motion recording, or hours ÷ 24 for a schedule. Storage is shown in decimal terabytes, the unit drives are sold in; an NVR menu that shows TiB will read about 9% lower.
drives = ceil( required × (1 + headroom) ÷ (drive size × (1 − overhead)) ), then RAID
RAID 1 mirrors (half the drives usable), RAID 5 spends one drive on parity (minimum 3), RAID 6 two (minimum 4), RAID 10 mirrors pairs (minimum 4). Days from installed divides the usable installed capacity by the bytes per day. Incoming bandwidth is the sum of the main streams, which flow whether or not they are being written; remote viewing assumes each viewer opens the full grid on sub-streams.
PoE budget
Power over Ethernet loses power in the cable as heat. The app solves the DC circuit for each device: the switch port pushes Vpse; the cable's loop resistance R drops it; the device draws its rated power P at whatever voltage reaches it.
I = P ÷ V_pd · loss = I² · R · port must source = P + loss
R = r × L for 802.3af/at (two pairs, two conductors in parallel each way) and r × L ÷ 2 for 802.3bt (four pairs), with r the conductor resistance per 100 m and L the run length. If the square root goes negative, the cable cannot deliver that power at all.
| Standard | Port may source | Device may draw | Switch minimum | Device minimum | Pairs |
|---|---|---|---|---|---|
| 802.3af, Type 1 | 15.4 W | 12.95 W | 44 V | 37 V | 2 |
| 802.3at, Type 2 | 30 W | 25.5 W | 50 V | 42.5 V | 2 |
| 802.3bt, Type 3 | 60 W | 51 W | 50 V | 42.5 V | 4 |
| 802.3bt, Type 4 | 90 W | 71.3 W | 52 V | 41.1 V | 4 |
| Cable | Resistance per 100 m per conductor |
|---|---|
| Cat5e, 24 AWG copper | 9.38 Ω (TIA-568 maximum) |
| Cat6 / Cat6A, 23 AWG copper | 7.6 Ω (typical) |
| CCA, 24 AWG copper-clad aluminum | 14.0 Ω (not TIA-compliant; for troubleshooting existing runs) |
Classes 1–8 follow IEEE 802.3: the smallest class whose device allowance covers the draw. A device is flagged when the port would exceed its limit, when the device would see less than its minimum voltage, or when it sits within 10 percent of the port limit. Max run for power searches for the longest cable that keeps all three within limits, up to 500 m; Ethernet data still stops at 100 m (328 ft), which the app states separately. The switch's minimum voltage gives the conservative result; enter the real output (often 53–54 V) for a real-world figure.
UPS runtime = battery Wh × inverter efficiency × usable charge ÷ load, where the load is the PoE the switch sources ÷ 0.9 (conversion loss) plus the NVR and anything else on the UPS.
Lens and coverage
scene width = 2 · distance · tan( HFOV ÷ 2 )
pixels per meter = horizontal pixels ÷ scene width · pixels per foot = px/m × 0.3048
The datasheet's horizontal field of view is the accurate input; sensor widths (1/3″ 4.8 mm, 1/2.8″ 5.4 mm, 1/2.5″ 5.8 mm, 1/1.8″ 7.2 mm, 1/1.2″ 10.7 mm) are nominal and vary by model. DORI levels follow IEC 62676-4: Detect 25, Observe 62.5, Recognize 125, Identify 250 pixels per meter. The maximum distance for a level is pixels ÷ (2 · tan(HFOV ÷ 2) · px/m). Lens for a target runs it backwards: the scene width that carries the level at the distance, the field of view that gives it, and the focal length for the chosen sensor (f = sensor width × distance × px/m ÷ pixels).
Where the real world differs
- Bitrates: night, rain and busy scenes push a camera above its daytime bitrate; the High scene factor or the configured bitrate covers it.
- PoE: cold cable has slightly less resistance, hot cable more; switch ratings are marketing maximums; a damaged or poorly terminated run adds resistance the model cannot see.
- Lenses: manufacturers round sensor sizes and fields of view; barrel distortion on wide lenses spreads pixels unevenly across the scene.