Skip to main content

SQL Numeric Precision Checker

v1.0.0

Pick NUMERIC precision and scale — for currency, latitudes, ratios; overflow estimator.

Result
Recommended SQL type: NUMERIC(14, 4)

Notes: 4 decimal places for currencies like JPY use 0, USD use 2 — consider 4 for exchange rates

Warning: NEVER use FLOAT or DOUBLE for money — rounding errors cause bugs

Storage (PostgreSQL):
  INTEGER = 4 bytes, BIGINT = 8 bytes
  NUMERIC(p,s) ≈ 2 bytes per group of 4 digits + overhead
  DOUBLE PRECISION = 8 bytes