> ## Documentation Index
> Fetch the complete documentation index at: https://docs.boltgroup.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Conversion

Converting **USD** to **Robux** can be tricky given how much the exchange rate fluctuates.

However, the most reliable benchmark is the **DevEx** rate. Short for Developer Exchange, **DevEx** is a documented **Roblox** system that allows creators to cash out their virtual currency for real money.

As of today, the rate is set at **\$0.0038 per Robux**.

We use this standard for all our conversions, while applying a few subtle adjustments to ensure ongoing accuracy.

# How it works?

<Steps>
  <Step title="Converting USD to Robux">
    The formula for this is quite easy, it is simply dividing the price in USD by the actual Robux rate, which looks like this for example:

    <CodeGroup>
      ```typescript TypeScript icon=brand-typescript lines wrap theme={null}
      let priceUsd: number = 10;
      let rateRobux: number = 0.0038;

      let priceRobux: number = priceUsd / rateRobux;
      console.log(priceRobux);
      // Output: 2631.5789
      ```

      ```javascript JavaScript icon=square-js lines wrap theme={null}
      let priceUsd = 10;
      let rateRobux = 0.0038;

      let priceRobux = priceUsd / rateRobux;
      console.log(priceRobux);
      // Output: 2631.5789
      ```

      ```python Python icon=python lines wrap theme={null}
      priceUsd = 10
      robuxRate = 0.0038

      priceRobux = priceUsd / robuxRate
      print(priceRobux)
      # Output: 2631.5789
      ```
    </CodeGroup>
  </Step>

  <Step title="Rounding to the greatest integer">
    At this point, we got our price in Robux, but... Roblox don't like decimals and needs us to use integers, so we round the value to the greatest integer, which would result in:

    <CodeGroup>
      ```typescript TypeScript icon=brand-typescript theme={null}
      let priceRobux: number = 2631.5789

      let rounded: number = Math.ceil(priceRobux)
      console.log(rounded);
      // Output: 2632
      ```

      ```javascript JavaScript icon=square-js theme={null}
      let priceRobux = 2631.5789

      let rounded = Math.ceil(priceRobux)
      console.log(rounded);
      // Output: 2632
      ```

      ```python Python icon=python theme={null}
      import math
      priceRobux = 2631.5789

      rounded = math.ceil(priceRobux)
      print(rounded)
      # Output: 2632
      ```
    </CodeGroup>
  </Step>
</Steps>
