For a good reference book on the major Jewish Holidays, I’d suggest Michael Strassfeld’s The Jewish Holidays: A Guide & Commentary.
Rabbi Nathan Bushwick’s Understanding the Jewish Calendar explains some of the mathematical and scientific underpinnings of the calendar.
For a comprehensive look at 25 different calendar systems (including Hebrew, Gregorian, Julian, Mayan and Hindu), and corresponding sample code in Lisp and Java, Reingold & Dershowitz’s Calendrical Calculations is an unparalleled resource.
Hebcal for UNIX is a free program and is available for download at https://github.com/hebcal/hebcal. This is the same engine that powers the hebcal.com website. The downloadable program has a text (command-line) interface, not a fancy graphical one.
Kaluach is an unrelated program available at http://www.kaluach.com/. The author requests donations, but does not have a set price.
Shabbat begins 18 minutes before sundown on Friday night. In Jerusalem, Shabbat begins 40 minutes before sundown.
According to the United States Naval Observatory,
Sunrise or sunset is defined to occur when the geometric zenith distance of center of the Sun is 90.8333 degrees. That is, the center of the Sun is geometrically 50 arcminutes below a horizontal plane. For an observer at sea level with a level, unobstructed horizon, under average atmospheric conditions, the upper limb of the Sun will then appear to be tangent to the horizon. The 50-arcminute geometric depression of the Sun’s center used for the computations is obtained by adding the average apparent radius of the Sun (16 arcminutes) to the average amount of atmospheric refraction at the horizon (34 arcminutes). [USNO]
Shabbat ends after sundown on Saturday night when there are three stars visible. Depending on latitude and longitude, this is usually between 42 and 72 minutes after sundown.
According to Wikipedia,
There are three widely observed practices, all of which have support in the halachic literature:
- Appearance of three medium-sized stars in the sky (sun 7°5′ below the horizon, or 42 minutes after sundown), as in the Talmud. This is normative practice in Conservative Judaism. In Orthodox Judaism, this position is used widely for the end of rabbinical fasts, but less frequently for the end of Shabbat or biblical festivals.
- Appearance of three small stars widely spaced in the sky (sun 8.5°-8.75° below the horizon): common practice in much of Orthodox Judaism 
- “50 minutes after sundown” is actually a variant of this position. Rabbi Moshe Feinstein ruled this way because most people cannot easily calculate when “8.5° after sundown” will occur, and 8.5° takes 50 minutes at its longest, near the summer solstice, at the latitude of much of the United States.
- 72 minutes after sundown (“opinion of Rabbeinu Tam“): equivalent to other definitions of nightfall, and safe according to all opinions. Common practice in Chasidic and other Charedi communities
Shabbat begins 18 minutes before sundown on Friday night.
Havdalah is 72 minutes after sundown on Saturday night.
So in a given week, Havdalah time is typically 90 minutes after the previous day’s candle-lighting time (18 + 72 = 90). Sometimes there’s an extra minute or two difference, and that’s due to sunset actually differing by a minute or two between Friday and Saturday nights.
Hebcal computes sunset based on an algorithm provided by the U.S. Naval Observatory (USNO). The USNO claims accuracy within 2 minutes except at extreme northern or southern latitudes.
Comparison to local NWS charts for sunrise and sunset (which are cheap and easy to come by) shows that with the double precision calculations, the charts produced by this program are no more than 1 minute removed from those charts in lattitudes lower than 41 degrees. Candle lighting times agree with those on popular calendars also to the 1 minute accuracy.
That said, the USNO algorithm can only approximate the candle-lighting times for your location. If you ever have any doubts about Hebcal’s times, consult your local halachic authority.
Since candle lighting times are determined from latitude and longitude, a process called geocoding is used to determine the geographic position of a zip code.
Our zip code database comes from the 1999 ZIP Code file from the U.S. Census Bureau’s Gazetteer project.
The Gazetteer data from 1999 is much more complete than their data from 1990 — but still not as good as the commercial-quality data you get from the U.S. Post Office. Gazetteer contains zip code, city name, latitude and lognitude but is missing time zone.
Fortunately, the Gazetteer data contain a FIPS code (which represents the county a zipcode is part of). The U.S. National Weather Service provides county-timezone data (keyed on FIPS code), which contains timezone and Daylight Saving Time data for each county. By joining these two data sources, we can get a complete picture of each zip code.
Candle-lighting and Havdalah times are available for the following 54 cities:
- Ashdod (31d48′ N lat, 34d38′ E long, GMT +2:00, israel)
- Atlanta (33d45′ N lat, 84d23′ W long, GMT -5:00, usa)
- Austin (30d16′ N lat, 97d45′ W long, GMT -6:00, usa)
- Baghdad (33d14′ N lat, 44d22′ E long, GMT +3:00, eu)
- Beer Sheva (31d15′ N lat, 34d47′ E long, GMT +2:00, israel)
- Berlin (52d31′ N lat, 13d24′ E long, GMT +1:00, eu)
- Baltimore (39d17′ N lat, 76d36′ W long, GMT -5:00, usa)
- Bogota (4d36′ N lat, 74d5′ W long, GMT -5:00, none)
- Boston (42d20′ N lat, 71d4′ W long, GMT -5:00, usa)
- Buenos Aires (34d37′ S lat, 58d24′ W long, GMT -3:00, none)
- Buffalo (42d53′ N lat, 78d52′ W long, GMT -5:00, usa)
- Chicago (41d50′ N lat, 87d45′ W long, GMT -6:00, usa)
- Cincinnati (39d6′ N lat, 84d31′ W long, GMT -5:00, usa)
- Cleveland (41d30′ N lat, 81d41′ W long, GMT -5:00, usa)
- Dallas (32d47′ N lat, 96d48′ W long, GMT -6:00, usa)
- Denver (39d44′ N lat, 104d59′ W long, GMT -7:00, usa)
- Detroit (42d20′ N lat, 83d2′ W long, GMT -5:00, usa)
- Eilat (29d33′ N lat, 34d57′ E long, GMT +2:00, israel)
- Gibraltar (36d8′ N lat, 5d21′ W long, GMT +1:00, eu)
- Haifa (32d49′ N lat, 34d59′ E long, GMT +2:00, israel)
- Hawaii (19d30′ N lat, 155d30′ W long, GMT -10:00, none)
- Houston (29d46′ N lat, 95d22′ W long, GMT -6:00, usa)
- Jerusalem (31d47′ N lat, 35d14′ E long, GMT +2:00, israel)
- Johannesburg (26d10′ S lat, 28d2′ E long, GMT +2:00, none)
- Kiev (50d28′ N lat, 30d29′ E long, GMT +2:00, eu)
- La Paz (16d30′ S lat, 68d9′ W long, GMT -4:00, none)
- Livingston (40d17′ N lat, 74d18′ W long, GMT -5:00, usa)
- London (51d30′ N lat, 0d10′ E long, GMT +0:00, eu)
- Los Angeles (34d4′ N lat, 118d15′ W long, GMT -8:00, usa)
- Miami (25d46′ N lat, 80d12′ W long, GMT -5:00, usa)
- Melbourne (37d52′ S lat, 145d8′ E long, GMT +10:00, aunz)
- Mexico City (19d24′ N lat, 99d9′ W long, GMT -6:00, mx)
- Montreal (45d30′ N lat, 73d36′ W long, GMT -5:00, usa)
- Moscow (55d45′ N lat, 37d42′ E long, GMT +3:00, eu)
- New York (40d43′ N lat, 74d1′ W long, GMT -5:00, usa)
- Omaha (41d16′ N lat, 95d56′ W long, GMT -6:00, usa)
- Ottawa (45d42′ N lat, 75d71′ W long, GMT -5:00, usa)
- Panama City (8d58′ N lat, 79d32′ W long, GMT -5:00, none)
- Paris (48d52′ N lat, 2d20′ E long, GMT +1:00, eu)
- Petach Tikvah (32d5′ N lat, 34d53′ E long, GMT +2:00, israel)
- Philadelphia (39d57′ N lat, 75d10′ W long, GMT -5:00, usa)
- Phoenix (33d27′ N lat, 112d4′ W long, GMT -7:00, none)
- Pittsburgh (40d26′ N lat, 80d0′ W long, GMT -5:00, usa)
- Saint Louis (38d38′ N lat, 90d12′ W long, GMT -6:00, usa)
- Saint Petersburg (59d53′ N lat, 30d15′ E long, GMT +3:00, eu)
- San Francisco (37d47′ N lat, 122d25′ W long, GMT -8:00, usa)
- Seattle (47d36′ N lat, 122d20′ W long, GMT -8:00, usa)
- Sydney (33d55′ S lat, 151d17′ E long, GMT +10:00, aunz)
- Tel Aviv (32d5′ N lat, 34d46′ E long, GMT +2:00, israel)
- Tiberias (32d58′ N lat, 35d32′ E long, GMT +2:00, israel)
- Toronto (43d38′ N lat, 79d24′ W long, GMT -5:00, usa)
- Vancouver (49d16′ N lat, 123d7′ W long, GMT -8:00, usa)
- White Plains (41d2′ N lat, 73d45′ W long, GMT -5:00, usa)
- Washington DC (38d55′ N lat, 77d0′ W long, GMT -5:00, usa)
Example: how to find candle-lighting times for San Jose, Costa Rica.
- Go to the Getty Thesaurus of Geographic Names at http://www.getty.edu/research/tools/vocabulary/tgn/
- Type “San Jose” in the Find box and click “Search” button
- Click on the link that says “San Jose, Costa Rica, inhabited place”
- Note the latitude/longitude represented in “degrees minutes direction” (in the example of San Jose, Costa Rica it is Lat: 09 56 N and Long: 084 05 W) and write this information down on a sheet of paper
- Go to the Hebcal Interactive Jewish Calendar at http://www.hebcal.com/hebcal/
- In the “Candle lighting times” section, click on the link that says “select by latitude/longitude“
- Type the latitude and longitude into the form (9 degrees, 56 minutes North Latitude, 84 degrees 5 minutes West Longitude)
- Select the Time zone and Daylight Saving Time options specific to your location
- Click “Get Calendar” button at the bottom of the form
Lotus Notes is not supported by hebcal.com. These instructions were provided by hebcal.com user Bruce Kahn. Your mileage may vary.
- Start Notes
- Create a new mail memo
- Attach the iCalendar file you just downloaded and save the memo as Draft
- Open the Draft memo up and right click on the attachment
- From the popup select “View” to see all entries in the file
- Select those you wish to import and then click on Import Selected or Import All
- Delete the Draft mail memo
Unfortunately there is no direct Import ability for iCalendar data so the steps above are necessary for now. Hopefully this will change in the future.
Included in the Hebcal Jewish holiday downloads are options to select major holidays (Rosh Hashana, Yom Kippur, Pesach, etc.), minor holidays (Purim, Chanukah, etc.), special Shabbatot, public fasts (Tish’a B’Av, etc.), Rosh Chodesh, and modern holidays (Yom HaAtzma’ut, etc.).