⚙️ Neural Network FLOPs Calculator

Estimate neural-network FLOPs for dense, convolution, and transformer operations. Compare forward-pass, inference, and approximate training compute.

✓ Formula shown✓ Worked example✓ Browser-only calculation✓ Updated 2026

Calculate Neural Network FLOPs

What this neural network FLOPs calculator calculates

Estimate floating-point operations for common network layers and convert the result into an approximate execution time at a chosen effective hardware throughput.

Peak hardware TFLOPS is not effective application throughput. Memory bandwidth, kernels, sparsity, batching, precision, and utilization can dominate.

Neural Network FLOPs Calculator formula

Dense forward FLOPs ≈ 2 × batch × input × output. Conv2D forward FLOPs ≈ 2 × batch × output height × output width × output channels × kernel area × input channels.

Assumptions and limitations

The result is an engineering estimate based on the values entered. AI models, tokenizers, runtimes, accelerators, cloud services, and provider billing rules differ. Validate important decisions with measured data from the exact model, hardware, framework, and pricing plan you intend to use.

Worked example

A batch of 32 through a 768×3,072 dense layer requires about 151 million forward FLOPs.

How to use the result

Peak hardware TFLOPS is not effective application throughput. Memory bandwidth, kernels, sparsity, batching, precision, and utilization can dominate.

  1. Start with representative production assumptions rather than best-case demos.
  2. Run a low, expected, and high scenario to understand the range.
  3. Record model version, pricing date, hardware, precision, and workload details.
  4. Replace assumptions with observed p50 and p95 measurements after testing.

Common mistakes to avoid

  • Using advertised peak TFLOPS as sustained throughput.
  • Confusing FLOPs, FLOP/s, MACs, and parameter count.
  • Ignoring attention’s sequence-length dependence and data movement.

Frequently asked questions

What is the difference between FLOPs and FLOP/s?

FLOPs measures work for an operation; FLOP/s measures the rate at which hardware performs that work.

Why multiply training by about three?

A rough training estimate includes forward pass plus backward computations for activations and weights. Exact ratios vary.

Are MACs the same as FLOPs?

A multiply-accumulate is often counted as two FLOPs, but conventions differ; always state the convention.

Related AI calculators

Methodology and privacy

This educational tool uses the formula and assumptions displayed on the page. Calculations run locally in your browser, and the page does not transmit the values you enter. Results are estimates rather than provider quotes, benchmark guarantees, financial advice, or capacity guarantees. Last methodology review: August 2, 2026.

Formula Explorer connections

Interpretation: This formula connects model architecture and numeric precision to compute, storage or accelerator-memory demand. Assumption: Architecture details, optimizer states, activations, framework buffers, sharding and quantization metadata can change measured requirements.

🏭 LLM Training Compute Calculator →🗜️ LLM Quantization Calculator →🧩 LoRA Adapter Size Calculator →CS & AI Formula Explorer →