Couldn't understand formula for Target first byte Time.

Hello. I know that this topic has been answered a few times, But I can’t reproduce exact formula for target first byte calculation. I almost broke my head off.

For example - here is the test results

As you can see Target FB time - 583 ms Target First Byte Time
Im getting in API
“connect_ms”: 161,
“dns_start”: 0,
“dns_end”: 371,
“connect_start”: 371,
“connect_end”: 532,
“ssl_start”: 0,
“ssl_end”: 0,

So as Glossary says Im making calculations:
connect_ms + dns + ssl = 532ms. It is not the result that I see on the above link.

Can you help me, please?

You can see the code here -

The target is essentially 3 * Round Trip Time + TLS + 100ms

man you are the Man. You just saved my day, thanx