Degree Days Weather API

Degree days are a standardized method to calculate the total heat or warmth a location has experienced. They are used in agriculture and gardening to estimate the growth stages of plants and phenology. Degree days can be also be used in building construction and maintenance as a way to estimate the heating and cooling needs of a building.

Degree Days Weather Data is available via our weather API as well as for download and viewing directly within our Weather Query Builder tool. The Degree Days Weather API is available in the Corporate and Enterprise plans.

This article uses the degree day features of the timeline API. For more information about the Timeline Weather API, please see the Weather API documentation.

How are degree days calculated?

Simple Average Calculation

By default we use a simple average calculation. The simple average degree days for a particular day is calculated using the following formula:

Mean temperature=(maximum temperature+minimum temperature)/2
Degree days=Mean Temperature-Base Temperature


The base temperature can differ depending on the use case. For example, the growing degree days for growing corn often use a base temperature of 50F. For cooling degree days (sometimes abbreviated CDD) , a base temperature of 65F commonly used.

In some application, such as growing degree days (often abbreviated GDD) , temperatures above a certain value are considered the same as a fixed maximum. This may be because a plant will grow faster with warmer temperatures but after the temperature increases too much, no additional growth benefits will be seen. This value is the maximum threshold – any temperature above the maximum temperature threshold will be treated as the maximum threshold temperature.

Finally, heating degree days (HDD) are calculated as the inverse of growing degree days. There are more heating degree days for days with colder mean temperatures.

 Heating Degree days=Base Temperature-Mean Temperature

The base temperature for heating degree days is typically 65F. Therefore heating degree days increases as the mean daily temperature drops.

Sine and triangle calculations

In addition to the simple average, the degree day API also supports sine and triangle calculation methods for degree days. These can be augmented to their double sine and double triangle methods to combine the low temperature for the current and following day for higher accuracy.

Degree Day API Reference

For full Timeline Weather API reference please see the API documentation.

To request degree day elements, use the API ‘elements’ parameter to request particular elements.

For example, adding this parameter to any timeline request will request the datetie, maximum and minimum temperatures, the degree days and the accumulated degree days:

&elements=datetime,tempmax,tempmin,degreedays,accdegreedays. 

It necessary to request both degreedays and accdegreedays elements if you are interested in retrieving only accdegreedays.

There are a number of parameters that are used to modify the degree day calculation:

degreeDayTempFix – The temperature at which to start the degree day season if no season start and end dates are specified. For example, if the fix temperature is 32F (OC), then the cumulative degree days will reset to zero on the last 32F temperature of the winter. This defines the growing season for growing degree days.

degreeDayStartDate – Fixes the start of the degree day season based on fixed dates of the format yyyy-M-d (eg 1990-3-1 for 1st March). Default=not specified.

degreeDayTempMaxThreshold – Defines the maximum temperature that is considered for the calculation. Any temperature above this temperature will be set to the maximum threshold temperature. Default value=not set.

degreeDayTempBase – The degree day base temperature. Default value is set to 10C/50F

degreeDayInverse – Calculate the inverse degree days so colder temperatures contribute more degree days. Used for heating degree days. Default=false.

degreeDayMethod  – The method used for calculating the degree days. Values include average, sine, doublesine, triangle and doubletriangle. Default value is set to average.

Degree Day API Usage Examples

Growing Degree Day Request

https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/timeline/London,UK/last30days?unitGroup=us&key=YOUR_API_KEY&include=days&elements=datetime,tempmax,tempmin,degreedays,accdegreedays&degreeDayTempBase=50 

This will request the last 30 days daily growing degree days for the requested location using the base temperature of 50F/10C. The degree days will be calculated for each day. In addition, the accumulated degree days (accdegreedays) over the requested timeframe is included.

Heating Degree Days

https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/timeline/London,UK/last30days?unitGroup=us&key=YOUR_API_KEY&include=days&elements=datetime,tempmax,tempmin,degreedays,accdegreedays&degreeDayTempBase=50&degreeDayInverse=true

In this case, the degreeDayInverse parameter has been set to true. This means that the API will calculate heating degree days. In addition, to define the heating season to cross a year boundary the year, we set explicit start and end dates.

Sine calculation method request

https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/timeline/London,UK/last30days?unitGroup=us&key=YOUR_API_KEY&include=days&elements=datetime,tempmax,tempmin,degreedays,accdegreedays&degreeDayTempMaxThreshold=86&degreeDayTempBase=50&degreeDayMethod=sine 

The “degreeDayMethod” parameter is added to change the default calculation method.

Corn Growing degree days request

https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/timeline/London,UK/last30days?unitGroup=us&key=YOUR_API_KEY&include=days&elements=datetime,tempmax,tempmin,degreedays,accdegreedays&degreeDayTempMaxThreshold=86&degreeDayTempBase=50&degreeDayMethod=sine 

Similar to the above, this defines the base growing temperature of 50F using the “degreeDayTempBase” parameter. The maximum growing temperature of 86F is set using the “degreeDayTempMaxThreshold” parameter.

Degree Day API Result Format

The Timeline Weather API supports both JSON and CSV output format.

JSON Format

The degree days and accumulated degree day values are added to the individual day elements of the JSON, along with any other elements that requested. No degree days will be listed in the hourly values

{
"latitude": 42.7319,
"longitude": -84.5523,
"resolvedAddress": "Lansing, MI, United States",
"address": "Lansing,MI",
"timezone": "America/Detroit",
"tzoffset": -4,
"days": [
{
"datetime": "2026-06-14",
"tempmax": 73.1,
"tempmin": 56.9,
"degreedays": 15,
"accdegreedays": 722
},
...
]
}

CSV Format

The degree days and accumulated degree day values are added as columns when daily CSV results are requested.

datetime,tempmax,tempmin,degreedays,accdegreedays
2026-06-14,73.1,56.9,15,722
2026-06-15,72.1,47.9,10,732
2026-06-16,72.9,54.9,14,746
2026-06-17,74,54.9,14,760
2026-06-18,70.4,61.8,16,776
2026-06-19,72.2,56.2,14,790

Using degree days for pest management, phenology, and plant disease models

A common application of degree days is timing field operations against insect life stages, plant phenology, or disease infection windows. The Timeline Weather API does not ship pre-built pest or disease models, but it provides the underlying degree-day series — historical, current, and forecast — that virtually all of these models consume. By combining the degreeDayTempBase, degreeDayTempMaxThreshold, degreeDayMethod, and degreeDayStartDate parameters with the accdegreedays element, you can reproduce most published pest-management and phenology models directly against Visual Crossing data.

The general workflow is:

  1. Pick the season start. For most insect models this is January 1 (degreeDayStartDate=YYYY-1-1). For models that begin at a biological event — first sustained moth catch, bud break, or full bloom — this is the biofix date, set as degreeDayStartDate=YYYY-MM-DD.
  2. Pick the calculation parameters published with the model. Most US Extension models use base 50°F with a 86°F or 88°F upper threshold and the single sine method, but some use base 40°F, base 43°F, or no upper cap at all. Always use the values published with the specific pest model.
  3. Read accdegreedays from the response and compare against the published threshold for the life stage or event of interest.

Because a single Timeline request can span past, present, and forecast days in one response, the same query can answer both “where am I now?” and “when will I cross the threshold over the next 15 days?”.

Common base / threshold / method conventions

Different pest models use different conventions. Match the parameters to the model — mixing methods will produce numbers that look reasonable but don’t match published thresholds.

  • Generic insect GDD (turf, scouting, bloom prediction): base 50°F, no upper cap, simple average.
  • Corn GDD (50/86 standard): base 50°F, upper 86°F, simple average — also widely used as the default for warm-season insects.
  • Codling moth and many tree-fruit pests: base 50°F, upper 88°F, single sine, horizontal cutoff.
  • Apple GDD from green tip: base 43°F (some models 32°F or 40°F), no upper cap.
  • Cool-season pests and small-grain phenology: base 32°F or 40°F, no upper cap.

The Timeline degree-day calculation always applies a horizontal cutoff at the maximum threshold (any temperature above degreeDayTempMaxThreshold is treated as the threshold value), which matches the convention used in most US Extension pest models.

Example: insect emergence from January 1 (calendar-start model)

Many insects are tracked from a fixed January 1 start — for example, emerald ash borer, eastern tent caterpillar, Japanese beetle, and bagworm in much of the US Midwest and Northeast. The following request returns the daily and accumulated GDD (base 50°F) for a single Michigan location from January 1 of the current year through the 15-day forecast horizon. Replace YYYY with the current year and YYYY-MM-DD with today’s date.

https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/timeline/Lansing,MI/YYYY-1-1/YYYY-MM-DD?unitGroup=us&key=YOUR_API_KEY&include=days&elements=datetime,tempmax,tempmin,degreedays,accdegreedays&degreeDayTempBase=50&degreeDayStartDate=YYYY-1-1

Common reference thresholds (illustrative; always confirm with your local Extension service):

  • Eastern tent caterpillar egg hatch: ≈ 90–100 DD50
  • Forsythia full bloom (used as a soil-temperature proxy): ≈ 50 DD50
  • Emerald ash borer adult emergence: ≈ 450–550 DD50
  • Pine needle scale crawler emergence: ≈ 298 DD50 (first generation)
  • Bagworm egg hatch: ≈ 600–900 DD50
  • Japanese beetle adult emergence: ≈ 970–1150 DD50

Once accdegreedays in the response crosses the published threshold, the application can flag the corresponding monitoring or treatment window.

Example: biofix model with sine method (codling moth)

Some pests are tracked from a biofix — a biologically observed event, most often the first sustained pheromone-trap catch. After biofix, the codling moth model is conventionally run with base 50°F, upper threshold 88°F, and the single sine method. First egg hatch is reached at roughly 250 DD past biofix; peak egg hatch at roughly 350–400 DD; second-generation flight typically near 1,000–1,060 DD.

Assuming biofix occurred on May 5, 2026:

https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/timeline/Traverse%20City,MI/2026-5-5/2026-7-31?unitGroup=us&key=YOUR_API_KEY&include=days&elements=datetime,tempmax,tempmin,degreedays,accdegreedays&degreeDayTempBase=50&degreeDayTempMaxThreshold=88&degreeDayMethod=sine&degreeDayStartDate=2026-5-5

Because the Timeline API supports the sinedoublesinetriangle, and doubletriangle methods, the same request structure can be used for any pest model published against those methods — for example switching to degreeDayMethod=doublesine for models that combine the next-day minimum temperature for higher accuracy.

Example: cool-season model with a low base (apple from green tip)

Some apple and small-grain models use a lower base — for example apple phenology and ascospore-maturity models often use base 43°F (6.1°C) measured from green-tip. To run a base 43°F model from a green-tip biofix on April 1, 2026:

https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/timeline/Grand%20Rapids,MI/2026-4-1/2026-6-30?unitGroup=us&key=YOUR_API_KEY&include=days&elements=datetime,tempmax,tempmin,degreedays,accdegreedays&degreeDayTempBase=43&degreeDayStartDate=2026-4-1

Combining degree days with disease and spray-window inputs

Some plant disease models are not purely degree-day driven. Apple scab ascospore release, fire blight (Cougar Blight, Maryblyt), and downy mildew use leaf wetness durationrelative humidity, or degree hours above 65°F — quantities that are derived hourly rather than from daily Tmax/Tmin. The Timeline API exposes the inputs these models need on the same response, so a single request can drive both a GDD-based pest model and a leaf-wetness-based disease model:

https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/timeline/Lansing,MI/YYYY-1-1/YYYY-MM-DD?unitGroup=us&key=YOUR_API_KEY&include=days,hours&elements=datetime,tempmax,tempmin,humidity,precip,degreedays,accdegreedays,leafwetness,leafwetnesshours,et0,soiltemp01&degreeDayTempBase=50&degreeDayStartDate=YYYY-1-1

For details on the leaf wetness, evapotranspiration, and soil temperature elements, see the Agriculture weather data elements article.

Notes for production use

  • GDD values are populated for historical, current, and forecast days within the same response. Forecast-day values use the 15-day model forecast, and dates beyond that fall back to statistical climatology — a reasonable hedge for “when will we cross the threshold” projections, but not a substitute for true model forecast.
  • The threshold values listed above are illustrative. Pest development thresholds vary by region, biotype, and model author. Customers building production pest-management tools should validate against their local Extension service or published model and treat the API as the data layer, not the model itself.
  • When tracking multiple generations of the same pest, run a second request with a later degreeDayStartDate set to the start of that generation rather than trying to encode the reset in a single accumulation.

Questions or need help?

If you have a question or need help, please post on our actively monitored forum for the fastest replies. You can also contact our Support Team.