Not a replacement for cryptographically strong passwords without audit.
If crypto.getRandomValues is available, each byte is used modulo the selected charset length (pick at least one of upper/lower/digits). Length is clamped to 1–512. Otherwise it falls back to Math.random (weaker). For passwords, prefer a dedicated password manager.
This calculator uses plain decimal numbers. If a result looks wrong, check whether you used a comma instead of a dot (or vice versa) where the field expects one.