For a given date of birth, and gender, return the date on which the UK State Pension will be available.

Usage no npm install needed!

<script type="module">
  import getStatePensionDate from '';



Build Status Code Coverage XO code style Install size

This package provides functions that allows the calculation of the date on which a UK citizen becomes eligible for their State Pension.


npm install get-state-pension-date



Takes a date of birth string and a gender and returns a Date object representing when State Pension age would be reached.

For example:

const {getStatePensionDate} = require('get-state-pension-date');

// Date: 2058-03-25T00:00:00.000Z
const spaDate = getStatePensionDate('1990-03-25', 'male');


Takes the same parameters as getStatePensionDate() but returns the State Pension age date as a string.

For example:

const {getStatePensionDateAsString} = require('get-state-pension-date');

// string: 2058-03-25
const spaString = getStatePensionDateAsString('1990-03-25', 'female');


Takes a date of birth and returns a boolean, returning true if the State Pension age date is today or in the past, false if it’s in the future.

For example:

const {isOverStatePensionAge} = require('get-state-pension-date');

// boolean: true
const overSpa = isOverStatePensionAge('1953-03-25');

// boolean: false
const workingAge = isOverStatePensionAge('1990-03-25');

All functions will throw if the date of birth is not a YYYY-MM-DD formatted string or if the gender is not a string of male or female.


The dates produced by this package are based on legislation in place at the point of publishing (November 2018). Dates that fall beyond the current legislation (i.e. after 5/4/1977) are calculated on a best endeavours basis only.

Further information about State Pension age timetables.