top of page

Fixed point Scaling Calculator

​​
This tool helps you design fixed-point representations for embedded systems by converting between data types, physical ranges, and scaling parameters.
Use the workflows below to quickly determine the correct resolution (LSB), bias, datatype, and Q-format.

Range Summary

Scaled Range

physMinText

physMaxText

DataType Range

RawMin

RawMax

Scaling Details

Resolution

resolutionText

QFormat  

qFormatText

Bias  

bias

Quantisation
Error 

quantErrorText

Implementation

Recommended Datatype

DataTypeText

Datatype Utilisation

utilizationText

Code Snippet

codeText

Available Workflows

1. Datatype → Range

Use this when you already know the datatype and scaling and want to compute the resulting physical range.

Inputs

  • Datatype (uint8, sint16, etc.)

  • Resolution (LSB)

  • Bias (optional)

Outputs

  • Raw integer range

  • Physical range

  • Quantization error

  • Q-format

  • C implementation macros

This is useful when validating an existing scaling definition.

2. Range → Scaling

Use this when you know the physical minimum and maximum values and want to determine the scaling parameters for a chosen datatype.

Inputs

  • Datatype

  • Physical minimum

  • Physical maximum

Outputs

  • Resolution (LSB)

  • Bias

  • Quantization error

  • Q-format

  • Example implementation code

The tool automatically snaps resolution to the nearest power of two, which is commonly required for efficient fixed-point implementation.

3. Range → Best Datatype

Use this when you know the physical range and desired resolution, but want the tool to select the smallest suitable datatype.

Inputs

  • Physical minimum

  • Physical maximum

  • Desired resolution (LSB)

Outputs

  • Recommended datatype

  • Utilization percentage of the integer range

  • Resolution and bias

  • Q-format

This helps ensure efficient memory usage while maintaining the required precision.

Implementation Output

The calculator also generates example C macros for converting between fixed-point values and physical values:

  • TO_REAL(x) – Convert raw integer to physical value

  • TO_FIXED(x) – Convert physical value to integer representation

These macros can be directly used in embedded C code.

Tip

For best numerical stability in embedded systems, power-of-two resolutions are recommended, since they allow implementations using bit shifts instead of divisions.

bottom of page