â˜ī¸

GPU Cloud Rental vs Buy Calculator

Compare hourly cloud GPU rental against buying local hardware for your AI workload. Find your break-even month and the cheaper path.

Pick a cloud instance

Pick a local GPU

Workload & costs

Cloud

Storage / IP retention.

Local

PSU, case, CPU, RAM.

After projection period.

Typical: 40-90%.

Cloud total (24 mo)

—

Local total

—

Local electricity

—

Effective $/hour (cloud)

—

Break-even

—

—

Verdict

—

—

Month-by-month cost

Month Cloud cumulative Local cumulative Difference Status

Cloud instance snapshot

Instance GPU VRAM $/hr 30-day 4hr/day
RunPod RTX 4090 (Secure Cloud) RTX 4090 24 GB $1.49 $179
Vast.ai RTX 4090 (spot-ish market) RTX 4090 24 GB $0.79 $95
Lambda Cloud 1x A100 SXM A100 80GB SXM 80 GB $1.99 $239
Lambda Cloud 1x H100 SXM H100 80GB SXM 80 GB $2.49 $299
CoreWeave 1x A100 A100 80GB 80 GB $2.25 $270
CoreWeave 1x H100 H100 80GB 80 GB $2.99 $359
AWS g5.2xlarge (1x A10G) A10G 24GB 24 GB $1.01 $121
AWS p4d.24xlarge (8x A100) 8x A100 40GB 320 GB $32.77 $3932
AWS p5.48xlarge (8x H100) 8x H100 80GB 640 GB $98.32 $11798
Google Cloud A3 VM (8x H100) 8x H100 80GB 640 GB $93.24 $11189
Azure NC24ads A100 v4 A100 80GB 80 GB $3.60 $432
Azure ND96isr H100 v5 8x H100 80GB 640 GB $99.12 $11894

When cloud wins

  • â€ĸ Sporadic workloads (under ~2 hours/day).
  • â€ĸ Need instant access to H100/A100 without upfront capital.
  • â€ĸ Teams in different time zones sharing hardware.
  • â€ĸ Scaling training jobs horizontally for short bursts.
  • â€ĸ Want to avoid maintenance, noise, and power constraints.

When buying wins

  • â€ĸ Daily inference or fine-tuning over many months.
  • â€ĸ Low electricity rates and space for a local rig.
  • â€ĸ Sensitive data that must stay on-premise.
  • â€ĸ Want to resell GPU later to recover part of the cost.
  • â€ĸ Can use the machine for other tasks when not training.

🤖 Use this tool in your agent

✓ Agent-ready code

Copy the snippet below into your agent, newsletter, or script. The tool page at hermesdispatch.dev/tools/gpu-cloud-vs-buy-calculator/ is the canonical contract: inputs, outputs, and formulas.

python
# Hermes Dispatch Tool — GPU Cloud Rental vs Buy Calculator
# Source: https://hermesdispatch.dev/tools/gpu-cloud-vs-buy-calculator/
# Description: Compare renting a cloud GPU by the hour against buying a local GPU.
# License: MIT (generated by hermesdispatch.dev)
#
# INSTALL:
#   1. Save this file as ~/.hermes/hermes-agent/tools/gpu_cloud_vs_buy_calculator.py
#   2. Restart Hermes or run /reset in a session
#   3. The tool auto-registers if Hermes uses auto-discovery of tools/*.py
#
# MANUAL REGISTRY (if auto-discovery is off):
#   from tools.gpu_cloud_vs_buy_calculator import register
#   register()

import json

DATA = {"cloud_instances": [{"name": "RunPod RTX 4090 (Secure Cloud)", "provider": "RunPod", "gpu": "RTX 4090", "vram_gb": 24, "hourly_usd": 1.49, "min_monthly_usd": 0, "source_url": "https://www.runpod.io/gpu-instance/pricing"}, {"name": "Vast.ai RTX 4090 (spot-ish market)", "provider": "Vast.ai", "gpu": "RTX 4090", "vram_gb": 24, "hourly_usd": 0.79, "min_monthly_usd": 0, "source_url": "https://vast.ai/"}, {"name": "Lambda Cloud 1x A100 SXM", "provider": "Lambda", "gpu": "A100 80GB SXM", "vram_gb": 80, "hourly_usd": 1.99, "min_monthly_usd": 0, "source_url": "https://lambdalabs.com/service/gpu-cloud"}, {"name": "Lambda Cloud 1x H100 SXM", "provider": "Lambda", "gpu": "H100 80GB SXM", "vram_gb": 80, "hourly_usd": 2.49, "min_monthly_usd": 0, "source_url": "https://lambdalabs.com/service/gpu-cloud"}, {"name": "CoreWeave 1x A100", "provider": "CoreWeave", "gpu": "A100 80GB", "vram_gb": 80, "hourly_usd": 2.25, "min_monthly_usd": 0, "source_url": "https://coreweave.com/gpu-cloud-pricing"}, {"name": "CoreWeave 1x H100", "provider": "CoreWeave", "gpu": "H100 80GB", "vram_gb": 80, "hourly_usd": 2.99, "min_monthly_usd": 0, "source_url": "https://coreweave.com/gpu-cloud-pricing"}, {"name": "AWS g5.2xlarge (1x A10G)", "provider": "AWS", "gpu": "A10G 24GB", "vram_gb": 24, "hourly_usd": 1.006, "min_monthly_usd": 0, "source_url": "https://aws.amazon.com/ec2/instance-types/g5/"}, {"name": "AWS p4d.24xlarge (8x A100)", "provider": "AWS", "gpu": "8x A100 40GB", "vram_gb": 320, "hourly_usd": 32.77, "min_monthly_usd": 0, "source_url": "https://aws.amazon.com/ec2/instance-types/p4/"}, {"name": "AWS p5.48xlarge (8x H100)", "provider": "AWS", "gpu": "8x H100 80GB", "vram_gb": 640, "hourly_usd": 98.32, "min_monthly_usd": 0, "source_url": "https://aws.amazon.com/ec2/instance-types/p5/"}, {"name": "Google Cloud A3 VM (8x H100)", "provider": "Google Cloud", "gpu": "8x H100 80GB", "vram_gb": 640, "hourly_usd": 93.24, "min_monthly_usd": 0, "source_url": "https://cloud.google.com/compute/gpus-pricing"}, {"name": "Azure NC24ads A100 v4", "provider": "Azure", "gpu": "A100 80GB", "vram_gb": 80, "hourly_usd": 3.6, "min_monthly_usd": 0, "source_url": "https://azure.microsoft.com/en-us/pricing/details/virtual-machines/linux/"}, {"name": "Azure ND96isr H100 v5", "provider": "Azure", "gpu": "8x H100 80GB", "vram_gb": 640, "hourly_usd": 99.12, "min_monthly_usd": 0, "source_url": "https://azure.microsoft.com/en-us/pricing/details/virtual-machines/linux/"}], "local_gpus": [{"name": "NVIDIA RTX 4090", "vram_gb": 24, "cost_usd": 1599, "typical_watts": 450, "source_url": "https://www.nvidia.com/en-us/geforce/graphics-cards/40-series/rtx-4090/"}, {"name": "NVIDIA RTX 3090 Ti", "vram_gb": 24, "cost_usd": 999, "typical_watts": 450, "source_url": "https://www.nvidia.com/"}, {"name": "NVIDIA RTX 5080", "vram_gb": 16, "cost_usd": 999, "typical_watts": 360, "source_url": "https://www.nvidia.com/"}, {"name": "NVIDIA RTX 5090", "vram_gb": 32, "cost_usd": 1999, "typical_watts": 575, "source_url": "https://www.nvidia.com/"}, {"name": "NVIDIA A100 80GB PCIe", "vram_gb": 80, "cost_usd": 10000, "typical_watts": 300, "source_url": "https://www.nvidia.com/en-us/data-center/a100/"}, {"name": "NVIDIA H100 80GB PCIe", "vram_gb": 80, "cost_usd": 25000, "typical_watts": 350, "source_url": "https://www.nvidia.com/en-us/data-center/h100/"}], "defaults": {"hours_per_day": 4, "days_per_month": 30, "months": 24, "cloud_hourly": 1.49, "cloud_min_monthly": 0, "local_gpu_cost": 1599, "local_gpu_watts": 450, "electricity_kwh": 0.13, "local_system_cost": 800, "resale_pct": 40}, "utilization_help": {"range": "40-90", "note": "Real inference rarely hits peak utilization 24/7. Training bursts are higher; chat workloads fluctuate."}}

def _ok(result):
    return json.dumps({"success": True, "data": result}, indent=2)

def _err(message):
    return json.dumps({"success": False, "error": message}, indent=2)


TOOL_NAME = "gpu_cloud_vs_buy_calculator"
TOOLSET = "hardware"

SCHEMA = {
  "type": "function",
  "function": {
    "name": "gpu_cloud_vs_buy_calculator",
    "description": "Compare renting a cloud GPU by the hour against buying a local GPU.",
    "parameters": {
      "type": "object",
      "properties": {
        "hours_per_month": {
          "type": "number",
          "description": "GPU hours used per month."
        },
        "months": {
          "type": "integer",
          "description": "Number of months to model."
        },
        "cloud_instance": {
          "type": "string",
          "description": "Cloud instance: RunPod RTX 4090 (Secure Cloud), Vast.ai RTX 4090 (spot-ish market), Lambda Cloud 1x A100 SXM, Lambda Cloud 1x H100 SXM, CoreWeave 1x A100, CoreWeave 1x H100, AWS g5.2xlarge (1x A10G), AWS p4d.24xlarge (8x A100), AWS p5.48xlarge (8x H100), Google Cloud A3 VM (8x H100), Azure NC24ads A100 v4, Azure ND96isr H100 v5"
        },
        "local_gpu": {
          "type": "string",
          "description": "Local GPU: NVIDIA RTX 4090, NVIDIA RTX 3090 Ti, NVIDIA RTX 5080, NVIDIA RTX 5090, NVIDIA A100 80GB PCIe, NVIDIA H100 80GB PCIe"
        }
      },
      "required": []
    }
  }
}

def _run(args):
    hours_per_month = float(args.get("hours_per_month", DATA["defaults"]["hours_per_month"]))
    months = int(args.get("months", DATA["defaults"]["months"]))
    cloud_name = args.get("cloud_instance", DATA["cloud_instances"][0]["name"])
    local_name = args.get("local_gpu", DATA["local_gpus"][0]["name"])
    instance = next((i for i in DATA["cloud_instances"] if i["name"] == cloud_name), DATA["cloud_instances"][0])
    local = next((g for g in DATA["local_gpus"] if g["name"] == local_name), DATA["local_gpus"][0])
    cloud_cost = instance["hourly_usd"] * hours_per_month * months
    local_total = local["cost"] + (local["wattage"] * hours_per_month / 1000 * 0.12 * months)
    resale = local_total * (local.get("resale_pct", 50) / 100)
    local_net = local_total - resale
    break_even = None
    if cloud_cost > 0:
        months_to_break = local_net / (cloud_cost / months)
        break_even = round(months_to_break, 1)
    return _ok({
        "cloud_total_cost": round(cloud_cost, 2),
        "local_net_cost": round(local_net, 2),
        "break_even_months": break_even,
        "recommendation": "Buy local" if break_even and break_even <= 12 else "Rent cloud"
    })

def HANDLER(args):
    try:
        return _run(args)
    except Exception as e:
        return _err(str(e))


def register():
    """Manual registry hook. Import and call this to register with Hermes."""
    try:
        from tools.registry import registry
        registry.register(
            name=TOOL_NAME,
            toolset=TOOLSET,
            schema=SCHEMA,
            handler=HANDLER,
        )
    except ImportError:
        print("Hermes registry not found; skipping manual registration.")

if __name__ == "__main__":
    # CLI smoke test
    print(HANDLER({}))

Want early access to the next locked tool? Subscribe to The Hermes Dispatch.

🚀 Get AI automation insights daily

15:00 MST. One-click unsubscribe.

Subscribe