Skip to content
masterclassBuddyTech Buzz5 fresh blogs · 5:00 AM IST

Neon · Const

Compute hours

Compute hours measure Neon compute usage. Calculate them by multiplying compute size in Compute Units by the number of active hours.

How it works

Compute hours measure resource consumption by combining a compute's capacity, expressed in Compute Units, with the time it remains active. Multiply the compute size by active hours; larger computes therefore accumulate the metric faster, while suspended time does not count as active runtime.

Syntax

compute hours = compute size * active hours

Returns

A usage quantity measured in compute hours.

Key points

  • Compute hours are a usage metric for measuring compute consumption.
  • For a 1 CU compute, one active hour equals one compute hour.
  • The calculation multiplies compute size by active hours.

Common mistakes

  • A fractional compute size needs multiple active hours to accumulate one compute hour.
  • A larger compute reaches one compute hour in less wall-clock time.

Example: Calculate compute hours

const computeSize = 0.25;
const activeHours = 4;
const computeHours = computeSize * activeHours;

console.log(`${computeHours} compute hour`);

Calculates compute-hour usage from a compute size and its active runtime.

When to use it

Usage estimation

Estimate usage for a compute over a known active runtime.

Capacity comparison

Compare consumption between compute sizes running for the same duration.

Usage monitoring

Interpret Neon usage metrics for billing and resource monitoring.

Interview questions

QHow is compute-hour usage calculated?

Compute hours are calculated as compute size multiplied by active hours. The formula is compute hours = compute size * active hours.

Follow-up: How much does a 2 CU compute use in 3 active hours? It uses 6 compute hours.

QHow does compute size affect the metric?

A 0.25 CU compute needs four active hours to consume one compute hour. A 4 CU compute needs only 15 active minutes for the same usage.

Follow-up: Why do these runtimes differ? Compute-hour usage scales directly with the compute's CU size.

QWhat does the metric represent?

Compute hours track compute usage rather than simply elapsed wall-clock time. The relevant runtime is the period during which the compute is active.

Follow-up: What should be checked when usage is unexpectedly high? Inspect both the compute size and how long it remains active.

  • active hours
  • compute size
  • Compute Unit (CU)

Source: Glossary - Neon Docs. Checked 2026-10-16.