> For the complete documentation index, see [llms.txt](https://fozan.gitbook.io/level/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fozan.gitbook.io/level/methods/calculateexperienceremaining.md).

# calculateExperienceRemaining

Calculate the experience remaining to reach the next level.

**Method `calculateExperienceRemaining`**

**Parameters:**

* `level` (number): The current level.
* `experience` (number): The current experience points.
* `baseExperience` (number): The base experience points.
* `experienceMultiplier` (number): The multiplier applied per level.

**Returns:**

* `number`: The experience remaining to reach the next level.

**Example Usage:**

```javascript
const LevelAlgorithm = require('level-algorithm');

const levelAlgorithm = new LevelAlgorithm({
  baseExperience: 100,
  experienceMultiplier: 1.5
});

const currentLevel = 5;
const currentExperience = 350;

const experienceRemaining = levelAlgorithm.calculateExperienceRemaining(currentLevel, currentExperience);

console.log(experienceRemaining); // Output: 163.34375 (based on example parameters)
```

This method calculates the remaining experience required to achieve the next level based on the provided current level, current experience, base experience, and experience multiplier within the `LevelAlgorithm` instance.
