---
title: "Transformer FLOPs & Memory Calculator"
description: "Browser calculator that turns a transformer's layers, width, heads, sequence length, batch size and precision into parameter count, training and inference FLOPs, KV-cache size and a training VRAM breakdown."
canonical: "https://vibing.inc/library/transformer-flops-memory-calculator-vg-2847"
category: "Dev Utilities & Vibe-Coding Tooling"
subcategory: "Browser utilities"
license: "Free hosted-tool access; no open-source license granted."
author: "Michael Lip (ml0x)"
source: "https://ml0x.com/tools/transformer-flops-memory-calculator"
---

# Transformer FLOPs & Memory Calculator
Browser calculator that turns a transformer's layers, width, heads, sequence length, batch size and precision into parameter count, training and inference FLOPs, KV-cache size and a training VRAM breakdown.
## Facts
- Source: https://ml0x.com/tools/transformer-flops-memory-calculator
- Category: Dev Utilities & Vibe-Coding Tooling / Browser utilities
- Author: Michael Lip (ml0x)
- Licence: Free hosted-tool access; no open-source license granted.
- Tags: machine-learning, transformers, gpu-memory, calculator
## Why it's a gem
It shows the arithmetic rather than a single number: 12·L·d_model² block parameters plus embeddings, the ~6N training / ~2N inference FLOPs-per-token rule with the attention and FFN terms, and optimizer-state bytes per precision, with GPT-2 to GPT-3 presets. Handy for checking whether a model fits a GPU before renting one. Runs entirely client-side.
---
Listed in The Vibeary: https://vibing.inc/library/transformer-flops-memory-calculator-vg-2847 · JSON: https://vibing.inc/api/public/library/gems/transformer-flops-memory-calculator-vg-2847