> For the complete documentation index, see [llms.txt](https://docs.thesports.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.thesports.com/help-center/football/calculation-of-match-minutes.md).

# Calculation of match minutes

### **How to calculate match minutes during regular time？**

The [**Real-time data**](/thesports-docs/basic-data/real-time-data.md) API endpoint provides the `Kick-off timestamp` field. Use this field together with the match status and following formula, which can also be found in the description of this API endpoint, to calculate the current match minute.

```
First half：match minutes = (current timestamp - first half kick-off timestamp) / 60 + 1
Second half：match minutes = (current timestamp - second half kick-off timestamp) / 60 + 45 + 1
```

The value of `Kick-off timestamp` is updated according to the current period:

* **First half:** `Kick-off timestamp` is the kick-off time of the first half.
* **Halftime:** Stop calculating the match minute and display the halftime status directly.
* **Second half:** `Kick-off timestamp` is updated to the kick-off time of the second half.

<figure><img src="/files/Ge2fNHzerrQvwg3bKTJE" alt=""><figcaption></figcaption></figure>

### **How to calculate adding time for each half？**

TheSports does not currently provide a field or formula for calculating adding time.

If you need to display adding time, you must calculate it locally.&#x20;

For example, record the timestamp when the 45th minute ends, then subtract it from the current timestamp.

### **How to calculate match minutes during overtime？**

The **Real-time data** API endpoint provides the `Kick-off timestamp` field for overtime and the corresponding formula for calculating match minutes during overtime.

```
Overtime：match minutes = (current timestamp - overtime kick-off timestamp) / 60 + 90 + 1
```

Some low-level competitions may not provide the `Kick-off timestamp` field for overtime. In this case, the field remains `0` during extra time, and the overtime match minute cannot be calculated.

There is no separate halftime status for the break between the two halves of overtime. Therefore, the timer continues during this break.

When the second half of overtime begins, `Kick-off timestamp` is automatically updated to account for the break. You can use the same calculation formula for both halves of overtime.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.thesports.com/help-center/football/calculation-of-match-minutes.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
