Is there a formula to calculate attribute table size?

To adding more 128 bit UUIDs, more services, and more characteristic.

vs_uuid_count is the number of 128 bit UUIDs. But I figured out the attr_tab_size only by increasing the size until without no memory error.

Is there a formula to know exactly the size of the attribute table softdevice will need?

Thanks