# Bit to PB Calculator - Convert Bits to Petabytes

## Conversion History (Last 6)

### Excel Formula to convert from Bit to PB

Apply the formula as shown below to convert from Bit to Petabyte.

A | B | C | |
---|---|---|---|

1 | Bit (b) | Petabyte (PB) | |

2 | 1 | =A2 * 0.000000000000000125 | |

3 |

Download - Excel Template for Bit to Petabyte Conversion

If you want to perform bulk conversion locally in your system, then download and make use of above Excel template.

### Python Code for Bit to PB Conversion

You can use below code to convert any value in Bit to Petabyte in Python.

bit = int(input("Enter Bit: "))

petabyte = bit / (8*1000*1000*1000*1000*1000)

print("{} Bit = {} Petabyte".format(bit,petabyte))

petabyte = bit / (8*1000*1000*1000*1000*1000)

print("{} Bit = {} Petabyte".format(bit,petabyte))

The first line of code will prompt the user to enter the Bit as an input. The value of Petabyte is calculated on the next line, and the code in third line will display the result.