> For the complete documentation index, see [llms.txt](https://docs.teller.org/teller-v2/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.teller.org/teller-v2/protocol/borrowers/getting-loan-information.md).

# Getting Loan Information

To facilitate a smooth borrower's user experience, the TellerV2 Protocol has the following methods to help make repayments easier.

$$
T = timestamp - lastRepaidTimestamp
$$

$$
P = loanPrincipal - repaidPrincipal
$$

$$
I = \dfrac{ T \* P \* APR }{ \text{ 365 days} }
$$

### Get total amount owed

Borrowers can find out the total amount owed back to the protocol for their loan, through the `calculateAmountOwed` method, which returns the total principal *plus* interest owed on a loan.

```solidity
/**
 * @notice Calculates the total amount owed for a bid.
 * @param _bidId The id of the loan bid to calculate the owed amount for.
 */
function calculateAmountOwed(uint256 _bidId)
```

### Get minimum amount due

The minimum amount due is how much the borrower must pay back by the next due date in order to keep their loan in good standing. Each loan has a **payment cycle duration** which defines the length of time between payments.

```solidity
/**
 * @notice Calculates the minimum payment amount due for a loan.
 * @param _bidId The id of the loan bid to get the payment amount for.
 */
function calculateAmountDue(uint256 _bidId)
```

$$
Due = \min{ (P + I, cyclePayment) }
$$

### Get next payment due date

Borrowers can manage their cash flow and budgets by calling the `calculateNextDueDate` , which will return the timestamp at which the next payment is due for their loan (before the loan is considered ***Delinquent***).

```solidity
/**
 * @notice Returns the next due date for a loan payment.
 * @param _bidId The id of the loan bid.
 */
function calculateNextDueDate(uint256 _bidId)
```

### Check payment status

Borrowers can also check if their payment is late by calling the `isPaymentLate` method, which returns a boolean indicating if the borrower is delinquent or not.

```solidity
/**
 * @notice Checks to see if a borrower is delinquent.
 * @param _bidId The id of the loan bid to check for.
 */
function isPaymentLate(uint256 _bidId)
```


---

# 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.teller.org/teller-v2/protocol/borrowers/getting-loan-information.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.
