Calcule the phase of the moon based on the date – Phase

by
Alexei Petrov
excel phase

The Problem:

Design and develop a program that calculates the phase of the moon based on a given date. The program should assign numerical values to each phase (1 for new moon, 2 for first quarter, 3 for full moon, and 4 for last quarter). Ensure that the calculated phase is accurate for a range of dates.

The Solutions:

Solution 1: Calculate the Phase of the Moon Based on the Date Using a Mathematical Formula

To calculate the phase of the moon based on a given date, you can use the following formula:

=INT((MOD((B2-DATE(2024;1;11));29.53059))/29.53059*4)+1

where:

  • B2 is the cell containing the date for which you want to calculate the moon phase.
  • DATE(2024;1;11) is the cell containing the date of the latest new moon (January 11, 2024).
  • 29.53059 is the average length of a lunar month in days.

This formula takes the difference between the given date and the date of the latest new moon, divides it by the average length of a lunar month, takes the integer part of the result, multiplies it by 4 to get the moon phase (1 for new moon, 2 for first quarter, 3 for full moon, and 4 for last quarter), and then adds 1 to get the final result.

Q&A

Is the formula that I’m currently using correct in calculating the phase of the moon?

The provided formula may not be accurate. Try this one: =INT((MOD((B2-DATE(2024;1;11));29.53059))/29.53059*4)+1

What is the phase of the moon on January 6, 2000?

New moon.

What is the phase of the moon on March 8, 2023?

Full moon (using given formula).

Video Explanation:

The following video, titled "Moon Phases and Tides Graphs - YouTube", provides additional insights and in-depth exploration related to the topics discussed in this post.

Play video

Tutorial video showing how to create graphs with images superimposed on top of them. 0:00 Introduction 0:41 Creating Graphs 1:15 Titles and ...