```python
def rearrange_bigger(n):
    """
    Creates the next bigger number by rearranging the digits of a given number.
    """
    digits = list(str(n))
    num_digits = len(digits)

    # Find the rightmost digit that is smaller than the digit to its right.
    # This digit is the 'pivot'.
    pivot_index = -1
    for i in range(num_digits - 2, -1, -1):
        if digits[i] < digits[i + 1]:
            pivot_index = i
            break

    # If no such pivot is found, the number is already the largest permutation.
    if pivot_index == -1:
        return n

    # Find the smallest digit to the right of the pivot that is larger than the pivot.
    swap_index = -1
    for j in range(num_digits - 1, pivot_index, -1):
        if digits[j] > digits[pivot_index]:
            swap_index = j
            break

    # Swap the pivot with the found digit.
    digits[pivot_index], digits[swap_index] = digits[swap_index], digits[pivot_index]

    # Sort the digits to the right of the pivot's original position in ascending order
    # to get the smallest possible number for the suffix.
    prefix = digits[:pivot_index + 1]
    suffix = digits[pivot_index + 1:]
    suffix.sort()

    # Combine the prefix and the sorted suffix, then convert back to an integer.
    result_str = "".join(prefix + suffix)
    return int(result_str)
```