Yes, during the setup of a membership level you can turn on the Price Prorated? setting if you have a hard expiration date. Enter the hard expiration date in the Expiration Date field. This will allow the software to calculate a price based on how many months remain between the date of transaction and the set expiration date.
The price calculation is based on number of months including the month of purchase. The membership cost on the 1st of the month and 31st or last day of the same month will be the same.