How to calculate optical power budget?
The power budget is the difference between the output power of the transmitter and the input power requirements of the receiver.

Budget explanation
Let’s, as an example, calculate optical transceiver power budget for EDGE model CWDM-10G-SFP-40-27:

Tx, Rx and Receiver sensitivity values
To calculate the power budget, we should use the following formula:
Min output power - (receiver sensitivity) = Power Budget (dB)
For the particular CWDM-10G-SFP-40-27 that would be:
(-3)-(-16) = 13 dB
From a physical line perspective, we should keep in mind the following aspects:
Typical connector loss is: 0.5 dB
Typical splice loss is: 0.5 dB
Typical fiber attenuation is:
1310nm 0.35 dB/km
1550nm 0.2 dB/km
Recommended Excess Margin: 3.0 dB
Please note that above mentioned physical aspects are only approximate. For exact numbers should refer to fiber, connector type, and splicing method.
The different-sized fibers have different optical loss dB/km values. Fiber loss depends heavily on the operating wavelength. Practical fibers have the lowest loss at 1550 nm and the highest loss at 780 nm with all physical fiber sizes (for example, 9/125 or 62.5/125).